Passed
Pull Request — master (#1451)
by
unknown
03:50
created

pkg/pb/base/v1/service.pb.validate.go   F

Size/Duplication

Total Lines 9344
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 1596
eloc 4963
dl 0
loc 9344
rs 0.8
c 0
b 0
f 0

704 Methods

Rating   Name   Duplication   Size   Complexity  
A basev1.AttributeReadResponseMultiError.Error 0 6 2
D basev1.*SchemaListRequest.validate 0 53 12
A basev1.TenantDeleteResponseValidationError.Reason 0 1 1
A basev1.*SchemaReadRequest.Validate 0 2 1
A basev1.PermissionSubjectPermissionResponseMultiError.AllErrors 0 1 1
A basev1.PermissionCheckRequestValidationError.Error 0 17 3
A basev1.PermissionLookupEntityResponseMultiError.AllErrors 0 1 1
A basev1.PermissionLookupSubjectRequestMultiError.Error 0 6 2
A basev1.HealthResponseValidationError.Key 0 1 1
A basev1.*RelationshipWriteResponse.validate 0 14 3
A basev1.SchemaReadResponseValidationError.Reason 0 1 1
A basev1.PermissionExpandRequestMetadataValidationError.Key 0 1 1
A basev1.PermissionCheckRequestMetadataValidationError.Reason 0 1 1
A basev1.RelationshipReadRequestMetadataValidationError.ErrorName 0 2 1
A basev1.DataWriteRequestMetadataMultiError.Error 0 6 2
A basev1.PermissionSubjectPermissionResponseMultiError.Error 0 6 2
A basev1.TenantListResponseValidationError.Key 0 1 1
A basev1.*DataWriteRequestMetadata.Validate 0 2 1
A basev1.*BundleDeleteResponse.Validate 0 2 1
A basev1.PermissionEntityFilterRequestMetadataValidationError.ErrorName 0 2 1
A basev1.*WatchResponse.ValidateAll 0 2 1
A basev1.AttributeReadRequestValidationError.Error 0 17 3
A basev1.RelationshipReadRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionCheckRequestValidationError.Key 0 1 1
A basev1.*BundleRunResponse.ValidateAll 0 2 1
A basev1.*SchemaReadResponse.ValidateAll 0 2 1
A basev1.BundleRunRequestValidationError.Error 0 17 3
A basev1.RelationshipWriteRequestMetadataMultiError.Error 0 6 2
A basev1.PermissionCheckRequestValidationError.ErrorName 0 2 1
A basev1.PermissionExpandRequestMetadataMultiError.Error 0 6 2
A basev1.RelationshipReadResponseValidationError.Cause 0 1 1
A basev1.*BundleRunResponse.validate 0 14 3
A basev1.BundleRunRequestValidationError.Field 0 1 1
B basev1.*WatchRequest.validate 0 36 7
A basev1.*PermissionSubjectPermissionRequestMetadata.ValidateAll 0 2 1
A basev1.*SchemaListRequest.Validate 0 2 1
A basev1.RelationshipDeleteResponseValidationError.Field 0 1 1
A basev1.RelationshipWriteRequestMetadataValidationError.Error 0 17 3
A basev1.TenantCreateRequestValidationError.Cause 0 1 1
A basev1.TenantDeleteRequestMultiError.Error 0 6 2
A basev1.PermissionEntityFilterRequestMetadataValidationError.Error 0 17 3
A basev1.RelationshipDeleteRequestMultiError.Error 0 6 2
A basev1.*SchemaPartialWriteRequest.ValidateAll 0 2 1
A basev1.TenantCreateRequestValidationError.Error 0 17 3
A basev1.SchemaPartialWriteResponseMultiError.AllErrors 0 1 1
A basev1.DataDeleteResponseValidationError.Cause 0 1 1
A basev1.*SchemaList.validate 0 16 3
A basev1.PermissionExpandRequestMetadataMultiError.AllErrors 0 1 1
A basev1.*HealthResponse.validate 0 14 3
A basev1.TenantListResponseValidationError.ErrorName 0 2 1
A basev1.PermissionEntityFilterRequestMetadataValidationError.Reason 0 1 1
A basev1.SchemaListResponseMultiError.Error 0 6 2
A basev1.*PermissionSubjectPermissionResponse.ValidateAll 0 2 1
A basev1.PermissionLookupSubjectResponseValidationError.ErrorName 0 2 1
A basev1.AttributeReadResponseValidationError.Cause 0 1 1
A basev1.*PermissionLookupEntityRequest.Validate 0 2 1
A basev1.DataDeleteResponseValidationError.Key 0 1 1
A basev1.DataDeleteRequestMultiError.Error 0 6 2
A basev1.TenantCreateRequestMultiError.AllErrors 0 1 1
A basev1.BundleDeleteResponseValidationError.ErrorName 0 2 1
A basev1.PermissionSubjectPermissionRequestMetadataMultiError.AllErrors 0 1 1
A basev1.BundleRunRequestValidationError.ErrorName 0 1 1
A basev1.TenantCreateResponseValidationError.Error 0 17 3
A basev1.RelationshipReadRequestMetadataMultiError.Error 0 6 2
A basev1.PermissionLookupSubjectRequestMetadataValidationError.Error 0 17 3
A basev1.RelationshipWriteResponseValidationError.Cause 0 1 1
A basev1.PermissionExpandRequestValidationError.Key 0 1 1
A basev1.BundleWriteResponseValidationError.ErrorName 0 2 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.Reason 0 1 1
A basev1.*PermissionCheckResponseMetadata.validate 0 14 3
A basev1.PermissionEntityFilterRequestMetadataMultiError.Error 0 6 2
A basev1.SchemaListResponseValidationError.Error 0 17 3
A basev1.SchemaReadResponseValidationError.Cause 0 1 1
A basev1.RelationshipDeleteRequestValidationError.Error 0 17 3
A basev1.SchemaReadResponseValidationError.ErrorName 0 2 1
C basev1.*SchemaListResponse.validate 0 50 11
A basev1.SchemaWriteResponseValidationError.Reason 0 1 1
A basev1.TenantCreateResponseValidationError.Field 0 1 1
A basev1.PermissionSubjectPermissionResponseValidationError.ErrorName 0 2 1
A basev1.TenantDeleteResponseMultiError.AllErrors 0 1 1
A basev1.*PermissionLookupEntityRequest.ValidateAll 0 2 1
A basev1.SchemaWriteRequestValidationError.ErrorName 0 2 1
A basev1.BundleWriteRequestMultiError.AllErrors 0 1 1
A basev1.BundleReadResponseValidationError.Cause 0 1 1
A basev1.HealthResponseValidationError.Field 0 1 1
A basev1.PermissionLookupEntityRequestMultiError.AllErrors 0 1 1
A basev1.*HealthRequest.validate 0 12 3
A basev1.SchemaListRequestValidationError.Cause 0 1 1
A basev1.RelationshipDeleteRequestMultiError.AllErrors 0 1 1
A basev1.PermissionExpandRequestMetadataValidationError.Reason 0 1 1
A basev1.RelationshipDeleteRequestValidationError.Cause 0 1 1
A basev1.TenantCreateRequestValidationError.ErrorName 0 2 1
A basev1.*SchemaReadResponse.Validate 0 2 1
A basev1.PermissionLookupEntityStreamResponseMultiError.AllErrors 0 1 1
A basev1.*SchemaPartialWriteResponse.validate 0 14 3
A basev1.*BundleRunRequest.Validate 0 2 1
A basev1.SchemaListResponseMultiError.AllErrors 0 1 1
A basev1.TenantListRequestValidationError.ErrorName 0 2 1
A basev1.*PermissionExpandRequestMetadata.ValidateAll 0 2 1
A basev1.SchemaReadResponseMultiError.AllErrors 0 1 1
A basev1.*SchemaPartialWriteResponse.ValidateAll 0 2 1
A basev1.*PermissionLookupSubjectResponse.Validate 0 2 1
A basev1.RelationshipReadRequestValidationError.Cause 0 1 1
A basev1.*AttributeReadRequest.ValidateAll 0 2 1
A basev1.PermissionExpandResponseValidationError.Error 0 17 3
A basev1.*PermissionLookupSubjectRequestMetadata.ValidateAll 0 2 1
A basev1.AttributeReadRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionLookupEntityResponseValidationError.Key 0 1 1
A basev1.*RelationshipWriteRequest.ValidateAll 0 2 1
A basev1.*SchemaWriteResponse.validate 0 14 3
A basev1.*RelationshipReadRequestMetadata.validate 0 14 3
A basev1.WatchResponseValidationError.Cause 0 1 1
A basev1.PermissionSubjectPermissionResponseValidationError.Error 0 17 3
A basev1.*PermissionExpandRequest.ValidateAll 0 2 1
A basev1.PermissionExpandRequestMultiError.AllErrors 0 1 1
A basev1.HealthResponseValidationError.Error 0 17 3
A basev1.BundleRunResponseValidationError.Key 0 1 1
A basev1.PermissionCheckResponseValidationError.Cause 0 1 1
A basev1.RelationshipWriteRequestMetadataMultiError.AllErrors 0 1 1
A basev1.*BundleWriteResponse.ValidateAll 0 2 1
A basev1.RelationshipWriteResponseValidationError.Field 0 1 1
A basev1.AttributeReadRequestMetadataValidationError.Error 0 17 3
A basev1.DataDeleteResponseValidationError.Reason 0 1 1
A basev1.*SchemaListResponse.Validate 0 2 1
A basev1.DataWriteRequestMetadataValidationError.Key 0 1 1
A basev1.*TenantListResponse.Validate 0 2 1
A basev1.TenantListRequestValidationError.Reason 0 1 1
A basev1.RelationshipDeleteResponseValidationError.ErrorName 0 2 1
A basev1.DataWriteRequestMetadataValidationError.ErrorName 0 2 1
A basev1.AttributeReadRequestMetadataValidationError.Reason 0 1 1
A basev1.BundleDeleteRequestValidationError.Field 0 1 1
A basev1.PermissionLookupSubjectResponseValidationError.Cause 0 1 1
A basev1.*TenantDeleteResponse.ValidateAll 0 2 1
A basev1.RelationshipReadRequestValidationError.Reason 0 1 1
A basev1.WatchRequestValidationError.Key 0 1 1
A basev1.BundleReadRequestValidationError.Reason 0 1 1
A basev1.SchemaListResponseValidationError.Reason 0 1 1
A basev1.PermissionCheckResponseMetadataMultiError.AllErrors 0 1 1
A basev1.AttributeReadResponseValidationError.Reason 0 1 1
A basev1.BundleWriteResponseValidationError.Key 0 1 1
A basev1.*TenantDeleteResponse.Validate 0 2 1
A basev1.*DataWriteResponse.validate 0 14 3
C basev1.*SchemaReadResponse.validate 0 41 10
A basev1.SchemaPartialWriteRequestMultiError.Error 0 6 2
A basev1.SchemaWriteRequestMultiError.Error 0 6 2
A basev1.PermissionCheckRequestMetadataValidationError.Error 0 17 3
A basev1.PermissionCheckResponseMetadataValidationError.Reason 0 1 1
A basev1.*SchemaListRequest.ValidateAll 0 2 1
A basev1.DataDeleteRequestValidationError.Key 0 1 1
A basev1.PermissionExpandResponseValidationError.Reason 0 1 1
A basev1.*RelationshipWriteRequest.Validate 0 2 1
A basev1.*BundleWriteResponse.validate 0 12 3
A basev1.*TenantDeleteRequest.Validate 0 2 1
A basev1.SchemaPartialWriteResponseValidationError.Field 0 1 1
A basev1.*PermissionSubjectPermissionResponse.validate 0 14 3
A basev1.RelationshipReadRequestMetadataMultiError.AllErrors 0 1 1
A basev1.WatchRequestValidationError.Field 0 1 1
A basev1.*TenantDeleteRequest.validate 0 12 3
A basev1.*RelationshipReadRequest.ValidateAll 0 2 1
A basev1.BundleWriteRequestValidationError.Key 0 1 1
A basev1.SchemaReadRequestValidationError.ErrorName 0 2 1
A basev1.PermissionSubjectPermissionRequestValidationError.Field 0 1 1
A basev1.HealthResponseValidationError.Reason 0 1 1
A basev1.*BundleReadRequest.ValidateAll 0 2 1
A basev1.PermissionLookupEntityStreamResponseValidationError.ErrorName 0 2 1
A basev1.SchemaListRequestValidationError.Key 0 1 1
F basev1.*PermissionExpandRequest.validate 0 203 45
A basev1.BundleDeleteResponseValidationError.Error 0 17 3
A basev1.*PermissionSubjectPermissionRequestMetadata.validate 0 29 5
A basev1.BundleWriteResponseMultiError.AllErrors 0 1 1
A basev1.PermissionLookupSubjectResponseValidationError.Error 0 17 3
A basev1.*DataWriteRequestMetadata.ValidateAll 0 2 1
A basev1.SchemaListValidationError.ErrorName 0 1 1
A basev1.RelationshipReadResponseMultiError.Error 0 6 2
A basev1.*DataDeleteResponse.validate 0 14 3
A basev1.TenantDeleteRequestValidationError.Reason 0 1 1
A basev1.*PermissionExpandResponse.ValidateAll 0 2 1
F basev1.*PermissionLookupSubjectRequest.validate 0 205 45
A basev1.*AttributeReadResponse.Validate 0 2 1
A basev1.*PermissionLookupEntityRequestMetadata.Validate 0 2 1
A basev1.*PermissionEntityFilterRequest.Validate 0 2 1
A basev1.PermissionCheckResponseMetadataValidationError.ErrorName 0 2 1
A basev1.RelationshipReadRequestValidationError.Field 0 1 1
A basev1.PermissionEntityFilterRequestMetadataMultiError.AllErrors 0 1 1
A basev1.*RelationshipWriteRequestMetadata.Validate 0 2 1
A basev1.PermissionEntityFilterRequestValidationError.ErrorName 0 2 1
A basev1.RelationshipWriteRequestMultiError.Error 0 6 2
A basev1.RelationshipWriteResponseMultiError.Error 0 6 2
A basev1.BundleReadResponseValidationError.Key 0 1 1
A basev1.*SchemaPartialWriteResponse.Validate 0 2 1
F basev1.*PermissionEntityFilterRequest.validate 0 161 37
F basev1.*DataDeleteRequest.validate 0 114 25
A basev1.RelationshipWriteRequestMetadataValidationError.ErrorName 0 2 1
A basev1.DataWriteRequestMetadataValidationError.Cause 0 1 1
A basev1.*WatchResponse.Validate 0 2 1
A basev1.SchemaListRequestValidationError.Error 0 17 3
A basev1.*PermissionCheckRequest.ValidateAll 0 2 1
A basev1.RelationshipWriteRequestValidationError.Field 0 1 1
A basev1.SchemaReadRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionCheckResponseValidationError.ErrorName 0 2 1
A basev1.*RelationshipDeleteResponse.ValidateAll 0 2 1
A basev1.BundleDeleteResponseValidationError.Cause 0 1 1
A basev1.*BundleReadRequest.Validate 0 2 1
A basev1.SchemaReadRequestMetadataValidationError.Reason 0 1 1
A basev1.PermissionLookupEntityResponseValidationError.ErrorName 0 2 1
A basev1.DataDeleteResponseValidationError.Error 0 17 3
A basev1.RelationshipWriteRequestValidationError.ErrorName 0 2 1
A basev1.SchemaPartialWriteResponseMultiError.Error 0 6 2
A basev1.*PermissionLookupEntityResponse.Validate 0 2 1
A basev1.WatchResponseValidationError.Field 0 1 1
A basev1.*PermissionLookupEntityStreamResponse.validate 0 14 3
A basev1.*PermissionSubjectPermissionRequest.Validate 0 2 1
A basev1.RelationshipDeleteRequestValidationError.Reason 0 1 1
A basev1.TenantCreateRequestValidationError.Field 0 1 1
A basev1.RelationshipWriteResponseValidationError.Reason 0 1 1
A basev1.BundleWriteRequestValidationError.Error 0 17 3
A basev1.DataWriteRequestValidationError.Cause 0 1 1
A basev1.SchemaWriteResponseMultiError.AllErrors 0 1 1
A basev1.PermissionSubjectPermissionResponseValidationError.Key 0 1 1
A basev1.SchemaWriteResponseValidationError.Field 0 1 1
A basev1.TenantCreateRequestValidationError.Key 0 1 1
A basev1.RelationshipReadRequestMetadataValidationError.Error 0 17 3
A basev1.AttributeReadRequestMetadataValidationError.ErrorName 0 2 1
A basev1.BundleDeleteRequestValidationError.ErrorName 0 2 1
A basev1.BundleReadRequestMultiError.AllErrors 0 1 1
A basev1.SchemaPartialWriteRequestValidationError.Reason 0 1 1
A basev1.BundleDeleteRequestValidationError.Key 0 1 1
A basev1.PermissionLookupEntityRequestValidationError.Key 0 1 1
A basev1.PermissionSubjectPermissionRequestMultiError.Error 0 6 2
A basev1.PermissionLookupEntityRequestValidationError.Field 0 1 1
A basev1.*PermissionLookupEntityStreamResponse.Validate 0 2 1
A basev1.RelationshipReadRequestValidationError.Key 0 1 1
A basev1.PermissionLookupSubjectRequestMetadataMultiError.AllErrors 0 1 1
A basev1.PermissionLookupEntityStreamResponseMultiError.Error 0 6 2
A basev1.TenantListResponseValidationError.Field 0 1 1
A basev1.SchemaListValidationError.Cause 0 1 1
A basev1.SchemaWriteRequestValidationError.Error 0 17 3
A basev1.PermissionExpandRequestMetadataValidationError.Error 0 17 3
A basev1.PermissionSubjectPermissionResponseValidationError.Field 0 1 1
A basev1.SchemaReadResponseValidationError.Field 0 1 1
A basev1.SchemaPartialWriteRequestMetadataMultiError.Error 0 6 2
A basev1.*RelationshipDeleteResponse.validate 0 14 3
A basev1.*SchemaWriteRequest.ValidateAll 0 2 1
A basev1.HealthResponseValidationError.Cause 0 1 1
A basev1.HealthRequestValidationError.ErrorName 0 1 1
A basev1.PermissionExpandResponseValidationError.ErrorName 0 2 1
A basev1.SchemaReadRequestMultiError.AllErrors 0 1 1
A basev1.*PermissionLookupEntityResponse.ValidateAll 0 2 1
A basev1.DataWriteResponseValidationError.Key 0 1 1
A basev1.RelationshipWriteRequestMetadataValidationError.Reason 0 1 1
A basev1.DataWriteRequestValidationError.Error 0 17 3
A basev1.RelationshipReadResponseMultiError.AllErrors 0 1 1
A basev1.DataDeleteResponseValidationError.ErrorName 0 2 1
A basev1.PermissionExpandResponseValidationError.Field 0 1 1
A basev1.*PermissionSubjectPermissionRequestMetadata.Validate 0 2 1
A basev1.*PermissionEntityFilterRequest.ValidateAll 0 2 1
A basev1.TenantListResponseValidationError.Error 0 17 3
A basev1.PermissionExpandRequestValidationError.ErrorName 0 2 1
A basev1.BundleRunResponseValidationError.Cause 0 1 1
A basev1.SchemaWriteRequestValidationError.Reason 0 1 1
A basev1.AttributeReadRequestMetadataValidationError.Key 0 1 1
A basev1.*TenantCreateResponse.ValidateAll 0 2 1
A basev1.*BundleDeleteRequest.Validate 0 2 1
A basev1.SchemaPartialWriteRequestMetadataValidationError.Error 0 17 3
F basev1.*AttributeReadRequest.validate 0 133 30
A basev1.TenantListResponseMultiError.AllErrors 0 1 1
A basev1.BundleWriteResponseValidationError.Reason 0 1 1
A basev1.SchemaWriteResponseValidationError.Error 0 17 3
A basev1.PermissionSubjectPermissionRequestValidationError.Key 0 1 1
A basev1.SchemaWriteResponseValidationError.Key 0 1 1
A basev1.DataDeleteRequestValidationError.Error 0 17 3
A basev1.*RelationshipReadRequest.Validate 0 2 1
A basev1.RelationshipWriteResponseValidationError.Key 0 1 1
A basev1.SchemaReadRequestMetadataMultiError.Error 0 6 2
A basev1.DataDeleteRequestValidationError.Reason 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.Error 0 17 3
A basev1.PermissionEntityFilterRequestValidationError.Reason 0 1 1
A basev1.SchemaListResponseValidationError.Key 0 1 1
A basev1.SchemaListValidationError.Error 0 17 3
A basev1.RelationshipWriteResponseValidationError.Error 0 17 3
A basev1.PermissionSubjectPermissionRequestValidationError.Error 0 17 3
A basev1.PermissionLookupSubjectResponseValidationError.Key 0 1 1
A basev1.SchemaListMultiError.AllErrors 0 1 1
A basev1.AttributeReadResponseValidationError.ErrorName 0 2 1
A basev1.*DataWriteResponse.Validate 0 2 1
A basev1.*SchemaWriteResponse.Validate 0 2 1
A basev1.TenantDeleteResponseValidationError.Cause 0 1 1
A basev1.PermissionExpandRequestMetadataValidationError.ErrorName 0 2 1
A basev1.PermissionLookupEntityRequestMetadataValidationError.Field 0 1 1
A basev1.*TenantListRequest.ValidateAll 0 2 1
A basev1.PermissionCheckResponseMetadataMultiError.Error 0 6 2
A basev1.PermissionLookupSubjectRequestMultiError.AllErrors 0 1 1
A basev1.*RelationshipWriteRequestMetadata.ValidateAll 0 2 1
C basev1.*PermissionCheckResponse.validate 0 43 10
A basev1.DataWriteResponseValidationError.ErrorName 0 2 1
A basev1.AttributeReadResponseMultiError.AllErrors 0 1 1
A basev1.AttributeReadRequestValidationError.Cause 0 1 1
A basev1.*AttributeReadRequestMetadata.Validate 0 2 1
A basev1.*RelationshipDeleteRequest.ValidateAll 0 2 1
A basev1.*BundleWriteRequest.ValidateAll 0 2 1
A basev1.PermissionEntityFilterRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.Key 0 1 1
A basev1.PermissionExpandRequestValidationError.Field 0 1 1
F basev1.*BundleWriteRequest.validate 0 68 15
A basev1.PermissionCheckResponseMetadataValidationError.Error 0 17 3
A basev1.*PermissionLookupSubjectRequest.Validate 0 2 1
A basev1.*SchemaReadRequest.ValidateAll 0 2 1
A basev1.SchemaReadRequestValidationError.Cause 0 1 1
A basev1.BundleReadRequestValidationError.Error 0 17 3
A basev1.SchemaReadRequestMetadataValidationError.Error 0 17 3
A basev1.RelationshipDeleteRequestValidationError.Field 0 1 1
A basev1.*SchemaReadRequestMetadata.Validate 0 2 1
A basev1.TenantDeleteResponseMultiError.Error 0 6 2
F basev1.*PermissionCheckRequest.validate 0 239 53
A basev1.*RelationshipReadRequestMetadata.Validate 0 2 1
A basev1.BundleReadRequestValidationError.Cause 0 1 1
A basev1.BundleReadResponseValidationError.Reason 0 1 1
A basev1.*RelationshipWriteRequestMetadata.validate 0 14 3
A basev1.TenantCreateResponseMultiError.Error 0 6 2
A basev1.SchemaPartialWriteRequestMetadataValidationError.Key 0 1 1
A basev1.BundleWriteRequestValidationError.ErrorName 0 2 1
A basev1.PermissionSubjectPermissionRequestMultiError.AllErrors 0 1 1
A basev1.PermissionLookupEntityStreamResponseValidationError.Cause 0 1 1
A basev1.*SchemaList.Validate 0 2 1
A basev1.*PermissionLookupSubjectResponse.validate 0 12 3
A basev1.PermissionCheckResponseValidationError.Reason 0 1 1
A basev1.TenantCreateResponseValidationError.Reason 0 1 1
A basev1.*PermissionCheckRequestMetadata.Validate 0 2 1
A basev1.*PermissionLookupSubjectResponse.ValidateAll 0 2 1
A basev1.PermissionLookupEntityRequestMetadataMultiError.Error 0 6 2
B basev1.*BundleRunRequest.validate 0 38 7
A basev1.PermissionLookupEntityRequestMultiError.Error 0 6 2
A basev1.SchemaReadRequestMetadataValidationError.ErrorName 0 2 1
A basev1.PermissionLookupSubjectRequestValidationError.Reason 0 1 1
A basev1.PermissionCheckRequestMultiError.Error 0 6 2
A basev1.PermissionLookupEntityResponseValidationError.Cause 0 1 1
A basev1.SchemaWriteRequestValidationError.Field 0 1 1
A basev1.TenantCreateRequestValidationError.Reason 0 1 1
A basev1.PermissionExpandRequestMetadataValidationError.Cause 0 1 1
C basev1.*BundleReadResponse.validate 0 41 10
A basev1.PermissionCheckResponseValidationError.Error 0 17 3
A basev1.TenantDeleteResponseValidationError.ErrorName 0 2 1
A basev1.*DataWriteRequestMetadata.validate 0 14 3
A basev1.BundleReadRequestMultiError.Error 0 6 2
A basev1.RelationshipReadRequestMetadataValidationError.Reason 0 1 1
A basev1.DataWriteResponseValidationError.Reason 0 1 1
A basev1.PermissionLookupSubjectRequestValidationError.Field 0 1 1
A basev1.*SchemaPartialWriteRequestMetadata.ValidateAll 0 2 1
A basev1.*BundleDeleteRequest.ValidateAll 0 2 1
A basev1.RelationshipWriteRequestMultiError.AllErrors 0 1 1
A basev1.DataWriteRequestValidationError.Reason 0 1 1
A basev1.BundleDeleteResponseValidationError.Key 0 1 1
A basev1.*BundleRunResponse.Validate 0 2 1
A basev1.PermissionLookupSubjectRequestValidationError.Key 0 1 1
A basev1.PermissionCheckResponseMultiError.AllErrors 0 1 1
A basev1.WatchRequestMultiError.Error 0 6 2
A basev1.DataWriteResponseMultiError.AllErrors 0 1 1
F basev1.*RelationshipWriteRequest.validate 0 130 29
A basev1.SchemaListValidationError.Field 0 1 1
A basev1.DataWriteRequestValidationError.Key 0 1 1
A basev1.HealthRequestValidationError.Reason 0 1 1
A basev1.BundleReadRequestValidationError.Field 0 1 1
A basev1.BundleRunResponseMultiError.Error 0 6 2
A basev1.SchemaReadRequestValidationError.Key 0 1 1
A basev1.*HealthResponse.ValidateAll 0 2 1
A basev1.BundleWriteResponseMultiError.Error 0 6 2
A basev1.*DataDeleteRequest.ValidateAll 0 2 1
A basev1.PermissionLookupEntityRequestMetadataValidationError.Cause 0 1 1
F basev1.*SchemaReadRequest.validate 0 74 16
A basev1.DataDeleteResponseMultiError.AllErrors 0 1 1
A basev1.SchemaWriteRequestMultiError.AllErrors 0 1 1
A basev1.*SchemaPartialWriteRequest.Validate 0 2 1
A basev1.RelationshipWriteRequestValidationError.Error 0 17 3
A basev1.PermissionCheckRequestMetadataValidationError.Field 0 1 1
A basev1.SchemaPartialWriteRequestMetadataValidationError.Field 0 1 1
A basev1.TenantCreateRequestMultiError.Error 0 6 2
A basev1.WatchResponseValidationError.ErrorName 0 1 1
A basev1.BundleWriteResponseValidationError.Field 0 1 1
A basev1.WatchResponseMultiError.Error 0 6 2
A basev1.PermissionCheckResponseMetadataValidationError.Cause 0 1 1
A basev1.DataDeleteRequestValidationError.Field 0 1 1
A basev1.RelationshipReadResponseValidationError.Field 0 1 1
A basev1.AttributeReadRequestValidationError.Field 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.ErrorName 0 2 1
A basev1.*SchemaReadRequestMetadata.ValidateAll 0 2 1
A basev1.*HealthRequest.ValidateAll 0 2 1
A basev1.RelationshipReadRequestMetadataValidationError.Cause 0 1 1
A basev1.*PermissionLookupEntityResponse.validate 0 12 3
A basev1.SchemaPartialWriteRequestMetadataValidationError.Reason 0 1 1
A basev1.RelationshipWriteRequestValidationError.Reason 0 1 1
C basev1.*AttributeReadResponse.validate 0 48 11
A basev1.*DataWriteRequest.Validate 0 2 1
A basev1.PermissionEntityFilterRequestMultiError.AllErrors 0 1 1
A basev1.SchemaWriteResponseValidationError.Cause 0 1 1
A basev1.BundleRunRequestValidationError.Cause 0 1 1
A basev1.PermissionLookupSubjectRequestValidationError.Error 0 17 3
A basev1.PermissionEntityFilterRequestMetadataValidationError.Cause 0 1 1
A basev1.*PermissionCheckRequestMetadata.validate 0 27 5
A basev1.PermissionSubjectPermissionResponseValidationError.Reason 0 1 1
A basev1.BundleDeleteResponseMultiError.AllErrors 0 1 1
A basev1.DataDeleteRequestValidationError.Cause 0 1 1
F basev1.*SchemaPartialWriteRequest.validate 0 120 26
A basev1.HealthRequestValidationError.Key 0 1 1
A basev1.*AttributeReadRequestMetadata.ValidateAll 0 2 1
A basev1.TenantDeleteRequestValidationError.Cause 0 1 1
A basev1.BundleDeleteRequestValidationError.Cause 0 1 1
C basev1.*RelationshipReadResponse.validate 0 48 11
A basev1.PermissionCheckRequestMetadataMultiError.AllErrors 0 1 1
A basev1.DataWriteRequestMetadataMultiError.AllErrors 0 1 1
A basev1.RelationshipReadRequestMultiError.AllErrors 0 1 1
A basev1.RelationshipDeleteRequestValidationError.Key 0 1 1
A basev1.WatchResponseValidationError.Reason 0 1 1
A basev1.*PermissionExpandResponse.Validate 0 2 1
A basev1.*DataDeleteResponse.ValidateAll 0 2 1
A basev1.SchemaPartialWriteRequestValidationError.Error 0 17 3
A basev1.PermissionLookupSubjectResponseMultiError.AllErrors 0 1 1
A basev1.SchemaReadResponseValidationError.Key 0 1 1
A basev1.BundleWriteRequestValidationError.Reason 0 1 1
A basev1.*PermissionEntityFilterRequestMetadata.Validate 0 2 1
A basev1.PermissionCheckRequestValidationError.Cause 0 1 1
F basev1.*RelationshipDeleteRequest.validate 0 63 14
A basev1.PermissionLookupEntityRequestValidationError.Error 0 17 3
A basev1.RelationshipDeleteResponseMultiError.AllErrors 0 1 1
A basev1.*TenantCreateRequest.ValidateAll 0 2 1
A basev1.SchemaListRequestValidationError.ErrorName 0 2 1
A basev1.BundleReadRequestValidationError.ErrorName 0 2 1
A basev1.PermissionLookupSubjectRequestMetadataMultiError.Error 0 6 2
A basev1.DataWriteRequestValidationError.ErrorName 0 1 1
A basev1.TenantDeleteResponseValidationError.Error 0 17 3
A basev1.*PermissionLookupEntityRequestMetadata.validate 0 27 5
A basev1.DataDeleteResponseMultiError.Error 0 6 2
A basev1.PermissionEntityFilterRequestMetadataValidationError.Key 0 1 1
A basev1.TenantListRequestMultiError.AllErrors 0 1 1
A basev1.*AttributeReadRequestMetadata.validate 0 14 3
A basev1.SchemaReadResponseValidationError.Error 0 17 3
A basev1.DataWriteRequestMultiError.Error 0 6 2
A basev1.RelationshipWriteRequestMetadataValidationError.Cause 0 1 1
A basev1.AttributeReadRequestValidationError.Reason 0 1 1
A basev1.SchemaListRequestMultiError.AllErrors 0 1 1
A basev1.BundleDeleteRequestMultiError.Error 0 6 2
A basev1.RelationshipReadResponseValidationError.Reason 0 1 1
A basev1.PermissionLookupEntityRequestValidationError.ErrorName 0 2 1
A basev1.PermissionLookupSubjectResponseMultiError.Error 0 6 2
A basev1.*HealthResponse.Validate 0 2 1
A basev1.PermissionCheckRequestValidationError.Field 0 1 1
A basev1.DataWriteResponseMultiError.Error 0 6 2
A basev1.RelationshipDeleteResponseValidationError.Reason 0 1 1
A basev1.PermissionCheckRequestMultiError.AllErrors 0 1 1
A basev1.PermissionSubjectPermissionResponseValidationError.Cause 0 1 1
A basev1.RelationshipWriteResponseMultiError.AllErrors 0 1 1
A basev1.AttributeReadRequestMultiError.Error 0 6 2
A basev1.TenantListRequestValidationError.Cause 0 1 1
A basev1.SchemaListRequestValidationError.Field 0 1 1
A basev1.TenantDeleteRequestMultiError.AllErrors 0 1 1
A basev1.TenantListResponseValidationError.Reason 0 1 1
A basev1.TenantListRequestValidationError.Error 0 17 3
A basev1.SchemaReadResponseMultiError.Error 0 6 2
A basev1.HealthRequestMultiError.Error 0 6 2
C basev1.*TenantCreateResponse.validate 0 41 10
A basev1.BundleRunResponseValidationError.ErrorName 0 2 1
A basev1.DataWriteRequestMetadataValidationError.Reason 0 1 1
A basev1.RelationshipDeleteRequestValidationError.ErrorName 0 2 1
A basev1.*AttributeReadResponse.ValidateAll 0 2 1
A basev1.SchemaListValidationError.Reason 0 1 1
A basev1.HealthRequestMultiError.AllErrors 0 1 1
A basev1.*PermissionEntityFilterRequestMetadata.validate 0 27 5
A basev1.PermissionCheckRequestMetadataValidationError.ErrorName 0 2 1
A basev1.SchemaListResponseValidationError.ErrorName 0 2 1
A basev1.PermissionLookupEntityRequestMetadataValidationError.Error 0 17 3
A basev1.DataWriteRequestMetadataValidationError.Error 0 17 3
A basev1.*PermissionSubjectPermissionRequest.ValidateAll 0 2 1
A basev1.DataWriteResponseValidationError.Field 0 1 1
A basev1.*SchemaWriteResponse.ValidateAll 0 2 1
A basev1.*SchemaListResponse.ValidateAll 0 2 1
A basev1.HealthResponseMultiError.AllErrors 0 1 1
A basev1.PermissionLookupEntityResponseValidationError.Reason 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.Field 0 1 1
A basev1.*TenantCreateResponse.Validate 0 2 1
A basev1.BundleRunResponseValidationError.Reason 0 1 1
A basev1.BundleRunResponseValidationError.Field 0 1 1
A basev1.*TenantDeleteRequest.ValidateAll 0 2 1
A basev1.SchemaPartialWriteResponseValidationError.ErrorName 0 2 1
A basev1.TenantListRequestValidationError.Key 0 1 1
A basev1.*SchemaPartialWriteRequestMetadata.Validate 0 2 1
A basev1.PermissionExpandResponseMultiError.AllErrors 0 1 1
A basev1.SchemaReadRequestMetadataMultiError.AllErrors 0 1 1
A basev1.PermissionLookupEntityRequestMetadataValidationError.Key 0 1 1
A basev1.BundleRunResponseValidationError.Error 0 17 3
A basev1.PermissionLookupEntityStreamResponseValidationError.Error 0 17 3
A basev1.BundleReadResponseValidationError.ErrorName 0 2 1
A basev1.DataDeleteRequestValidationError.ErrorName 0 2 1
A basev1.AttributeReadRequestMetadataMultiError.AllErrors 0 1 1
A basev1.PermissionCheckRequestValidationError.Reason 0 1 1
A basev1.TenantListRequestMultiError.Error 0 6 2
A basev1.*TenantListResponse.ValidateAll 0 2 1
C basev1.*TenantDeleteResponse.validate 0 41 10
A basev1.PermissionLookupEntityStreamResponseValidationError.Field 0 1 1
A basev1.TenantCreateResponseValidationError.Cause 0 1 1
A basev1.RelationshipWriteRequestMetadataValidationError.Field 0 1 1
A basev1.AttributeReadRequestMetadataValidationError.Cause 0 1 1
A basev1.PermissionEntityFilterRequestValidationError.Cause 0 1 1
A basev1.BundleRunRequestValidationError.Key 0 1 1
A basev1.PermissionExpandRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionCheckResponseMultiError.Error 0 6 2
A basev1.WatchResponseMultiError.AllErrors 0 1 1
A basev1.SchemaPartialWriteRequestValidationError.Field 0 1 1
A basev1.*PermissionLookupEntityStreamResponse.ValidateAll 0 2 1
A basev1.PermissionCheckResponseMetadataValidationError.Field 0 1 1
A basev1.WatchResponseValidationError.Key 0 1 1
A basev1.AttributeReadRequestValidationError.Key 0 1 1
A basev1.RelationshipWriteRequestMetadataValidationError.Key 0 1 1
A basev1.PermissionExpandRequestValidationError.Cause 0 1 1
A basev1.*DataDeleteResponse.Validate 0 2 1
A basev1.BundleDeleteResponseValidationError.Field 0 1 1
A basev1.PermissionCheckRequestMetadataValidationError.Key 0 1 1
A basev1.SchemaPartialWriteRequestMetadataMultiError.AllErrors 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataMultiError.Error 0 6 2
A basev1.TenantDeleteRequestValidationError.Key 0 1 1
A basev1.SchemaPartialWriteResponseValidationError.Key 0 1 1
A basev1.RelationshipReadResponseValidationError.ErrorName 0 2 1
C basev1.*WatchResponse.validate 0 41 10
A basev1.PermissionLookupEntityRequestValidationError.Cause 0 1 1
A basev1.*RelationshipWriteResponse.ValidateAll 0 2 1
A basev1.BundleRunRequestMultiError.Error 0 6 2
A basev1.PermissionLookupEntityRequestMetadataValidationError.ErrorName 0 2 1
A basev1.*SchemaReadRequestMetadata.validate 0 14 3
B basev1.*SchemaWriteRequest.validate 0 36 7
B basev1.*BundleReadRequest.validate 0 36 7
C basev1.*TenantListResponse.validate 0 48 11
A basev1.SchemaPartialWriteRequestValidationError.Key 0 1 1
A basev1.*BundleDeleteResponse.ValidateAll 0 2 1
A basev1.*PermissionCheckRequestMetadata.ValidateAll 0 2 1
A basev1.BundleDeleteResponseValidationError.Reason 0 1 1
A basev1.BundleRunRequestValidationError.Reason 0 1 1
A basev1.*BundleWriteResponse.Validate 0 2 1
A basev1.SchemaListResponseValidationError.Cause 0 1 1
A basev1.PermissionSubjectPermissionRequestValidationError.ErrorName 0 2 1
A basev1.*PermissionLookupEntityRequestMetadata.ValidateAll 0 2 1
A basev1.SchemaPartialWriteRequestValidationError.ErrorName 0 2 1
A basev1.PermissionExpandResponseMultiError.Error 0 6 2
A basev1.WatchRequestValidationError.Reason 0 1 1
A basev1.SchemaListRequestValidationError.Reason 0 1 1
A basev1.SchemaListMultiError.Error 0 6 2
F basev1.*RelationshipReadRequest.validate 0 133 30
A basev1.TenantListRequestValidationError.Field 0 1 1
A basev1.RelationshipReadRequestValidationError.Error 0 17 3
A basev1.TenantCreateResponseValidationError.ErrorName 0 2 1
A basev1.RelationshipDeleteResponseMultiError.Error 0 6 2
A basev1.*PermissionSubjectPermissionResponse.Validate 0 2 1
A basev1.PermissionExpandResponseValidationError.Key 0 1 1
A basev1.SchemaReadRequestValidationError.Error 0 17 3
A basev1.DataWriteRequestMetadataValidationError.Field 0 1 1
A basev1.PermissionLookupEntityResponseMultiError.Error 0 6 2
A basev1.*PermissionCheckResponse.Validate 0 2 1
A basev1.*BundleReadResponse.ValidateAll 0 2 1
A basev1.*BundleRunRequest.ValidateAll 0 2 1
A basev1.SchemaListRequestMultiError.Error 0 6 2
A basev1.BundleWriteResponseValidationError.Cause 0 1 1
A basev1.SchemaPartialWriteResponseValidationError.Error 0 17 3
A basev1.SchemaWriteResponseValidationError.ErrorName 0 2 1
F basev1.*PermissionLookupEntityRequest.validate 0 187 40
A basev1.SchemaReadRequestMetadataValidationError.Key 0 1 1
A basev1.SchemaPartialWriteResponseValidationError.Reason 0 1 1
A basev1.PermissionLookupSubjectResponseValidationError.Reason 0 1 1
A basev1.RelationshipDeleteResponseValidationError.Key 0 1 1
A basev1.*DataWriteRequest.ValidateAll 0 2 1
A basev1.AttributeReadRequestValidationError.ErrorName 0 2 1
A basev1.PermissionLookupSubjectRequestMetadataValidationError.Key 0 1 1
A basev1.*SchemaPartialWriteRequestMetadata.validate 0 14 3
A basev1.HealthResponseValidationError.ErrorName 0 1 1
A basev1.SchemaPartialWriteResponseValidationError.Cause 0 1 1
A basev1.DataWriteRequestValidationError.Field 0 1 1
A basev1.RelationshipWriteRequestValidationError.Key 0 1 1
A basev1.*RelationshipReadRequestMetadata.ValidateAll 0 2 1
A basev1.*RelationshipDeleteResponse.Validate 0 2 1
B basev1.*BundleDeleteRequest.validate 0 36 7
A basev1.TenantCreateResponseValidationError.Key 0 1 1
A basev1.TenantDeleteResponseValidationError.Field 0 1 1
A basev1.WatchRequestMultiError.AllErrors 0 1 1
A basev1.PermissionEntityFilterRequestValidationError.Key 0 1 1
A basev1.PermissionLookupSubjectResponseValidationError.Field 0 1 1
A basev1.HealthRequestValidationError.Field 0 1 1
A basev1.RelationshipWriteResponseValidationError.ErrorName 0 2 1
A basev1.*PermissionLookupSubjectRequestMetadata.validate 0 27 5
A basev1.DataDeleteResponseValidationError.Field 0 1 1
A basev1.DataWriteResponseValidationError.Cause 0 1 1
A basev1.PermissionLookupSubjectRequestValidationError.ErrorName 0 2 1
A basev1.RelationshipReadRequestMetadataValidationError.Key 0 1 1
A basev1.PermissionEntityFilterRequestMultiError.Error 0 6 2
A basev1.WatchRequestValidationError.ErrorName 0 1 1
A basev1.*WatchRequest.Validate 0 2 1
A basev1.PermissionCheckResponseMetadataValidationError.Key 0 1 1
A basev1.DataWriteRequestMultiError.AllErrors 0 1 1
A basev1.PermissionSubjectPermissionRequestMetadataValidationError.Cause 0 1 1
A basev1.PermissionCheckResponseValidationError.Field 0 1 1
A basev1.PermissionEntityFilterRequestValidationError.Error 0 17 3
A basev1.PermissionCheckRequestMetadataMultiError.Error 0 6 2
A basev1.PermissionLookupEntityStreamResponseValidationError.Reason 0 1 1
A basev1.*PermissionExpandRequest.Validate 0 2 1
A basev1.PermissionExpandRequestMultiError.Error 0 6 2
A basev1.PermissionLookupEntityRequestValidationError.Reason 0 1 1
A basev1.PermissionCheckRequestMetadataValidationError.Cause 0 1 1
A basev1.*PermissionCheckResponse.ValidateAll 0 2 1
A basev1.PermissionLookupSubjectRequestMetadataValidationError.Cause 0 1 1
A basev1.BundleDeleteRequestMultiError.AllErrors 0 1 1
A basev1.TenantCreateResponseMultiError.AllErrors 0 1 1
A basev1.BundleWriteResponseValidationError.Error 0 17 3
A basev1.WatchRequestValidationError.Error 0 17 3
A basev1.*DataDeleteRequest.Validate 0 2 1
A basev1.WatchResponseValidationError.Error 0 17 3
A basev1.BundleWriteRequestValidationError.Cause 0 1 1
F basev1.*DataWriteRequest.validate 0 186 40
A basev1.*PermissionLookupSubjectRequest.ValidateAll 0 2 1
A basev1.*PermissionEntityFilterRequestMetadata.ValidateAll 0 2 1
A basev1.*BundleReadResponse.Validate 0 2 1
A basev1.HealthResponseMultiError.Error 0 6 2
A basev1.PermissionLookupEntityRequestMetadataValidationError.Reason 0 1 1
A basev1.AttributeReadRequestMultiError.AllErrors 0 1 1
A basev1.AttributeReadResponseValidationError.Error 0 17 3
A basev1.DataWriteResponseValidationError.Error 0 17 3
A basev1.TenantListResponseValidationError.Cause 0 1 1
A basev1.PermissionExpandRequestValidationError.Reason 0 1 1
A basev1.RelationshipWriteRequestValidationError.Cause 0 1 1
A basev1.PermissionLookupEntityStreamResponseValidationError.Key 0 1 1
A basev1.PermissionLookupSubjectRequestMetadataValidationError.ErrorName 0 2 1
A basev1.SchemaReadRequestMultiError.Error 0 6 2
A basev1.TenantDeleteRequestValidationError.ErrorName 0 2 1
A basev1.BundleRunRequestMultiError.AllErrors 0 1 1
A basev1.PermissionLookupEntityResponseValidationError.Error 0 17 3
A basev1.SchemaPartialWriteRequestMetadataValidationError.ErrorName 0 2 1
A basev1.BundleWriteRequestMultiError.Error 0 6 2
A basev1.PermissionLookupSubjectRequestMetadataValidationError.Field 0 1 1
A basev1.SchemaReadRequestValidationError.Reason 0 1 1
A basev1.SchemaListResponseValidationError.Field 0 1 1
A basev1.RelationshipReadResponseValidationError.Error 0 17 3
A basev1.SchemaReadRequestValidationError.Field 0 1 1
A basev1.BundleReadResponseMultiError.AllErrors 0 1 1
A basev1.*PermissionExpandRequestMetadata.Validate 0 2 1
A basev1.AttributeReadRequestMetadataMultiError.Error 0 6 2
A basev1.TenantDeleteRequestValidationError.Field 0 1 1
A basev1.*SchemaWriteRequest.Validate 0 2 1
A basev1.BundleReadRequestValidationError.Key 0 1 1
A basev1.SchemaWriteRequestValidationError.Key 0 1 1
A basev1.RelationshipReadRequestValidationError.ErrorName 0 2 1
A basev1.SchemaListValidationError.Key 0 1 1
A basev1.*TenantCreateRequest.Validate 0 2 1
C basev1.*PermissionExpandResponse.validate 0 41 10
A basev1.AttributeReadResponseValidationError.Key 0 1 1
A basev1.AttributeReadResponseValidationError.Field 0 1 1
A basev1.PermissionEntityFilterRequestValidationError.Field 0 1 1
A basev1.*RelationshipReadResponse.Validate 0 2 1
A basev1.SchemaPartialWriteRequestMultiError.AllErrors 0 1 1
A basev1.*BundleDeleteResponse.validate 0 14 3
A basev1.*PermissionExpandRequestMetadata.validate 0 16 3
A basev1.RelationshipReadRequestMultiError.Error 0 6 2
A basev1.SchemaWriteResponseMultiError.Error 0 6 2
A basev1.*HealthRequest.Validate 0 2 1
A basev1.SchemaReadRequestMetadataValidationError.Cause 0 1 1
A basev1.PermissionExpandRequestValidationError.Error 0 17 3
A basev1.PermissionLookupEntityRequestMetadataMultiError.AllErrors 0 1 1
A basev1.*AttributeReadRequest.Validate 0 2 1
C basev1.*TenantCreateRequest.validate 0 45 9
A basev1.*RelationshipReadResponse.ValidateAll 0 2 1
B basev1.*TenantListRequest.validate 0 31 8
A basev1.*PermissionCheckResponseMetadata.Validate 0 2 1
A basev1.PermissionLookupSubjectRequestValidationError.Cause 0 1 1
A basev1.SchemaPartialWriteRequestMetadataValidationError.Cause 0 1 1
A basev1.SchemaWriteRequestValidationError.Cause 0 1 1
A basev1.TenantDeleteRequestValidationError.Error 0 17 3
A basev1.*TenantListRequest.Validate 0 2 1
A basev1.*SchemaList.ValidateAll 0 2 1
A basev1.*PermissionLookupSubjectRequestMetadata.Validate 0 2 1
A basev1.PermissionSubjectPermissionRequestValidationError.Cause 0 1 1
A basev1.PermissionSubjectPermissionRequestValidationError.Reason 0 1 1
A basev1.*BundleWriteRequest.Validate 0 2 1
A basev1.BundleDeleteRequestValidationError.Reason 0 1 1
A basev1.BundleReadResponseMultiError.Error 0 6 2
A basev1.BundleReadResponseValidationError.Field 0 1 1
F basev1.*PermissionSubjectPermissionRequest.validate 0 183 41
A basev1.PermissionLookupEntityResponseValidationError.Field 0 1 1
A basev1.PermissionLookupSubjectRequestMetadataValidationError.Reason 0 1 1
A basev1.*RelationshipWriteResponse.Validate 0 2 1
A basev1.WatchRequestValidationError.Cause 0 1 1
A basev1.PermissionExpandResponseValidationError.Cause 0 1 1
A basev1.RelationshipDeleteResponseValidationError.Cause 0 1 1
A basev1.*WatchRequest.ValidateAll 0 2 1
A basev1.BundleDeleteRequestValidationError.Error 0 17 3
A basev1.HealthRequestValidationError.Cause 0 1 1
A basev1.*PermissionCheckResponseMetadata.ValidateAll 0 2 1
A basev1.TenantListResponseMultiError.Error 0 6 2
A basev1.*DataWriteResponse.ValidateAll 0 2 1
A basev1.SchemaPartialWriteRequestValidationError.Cause 0 1 1
A basev1.BundleWriteRequestValidationError.Field 0 1 1
A basev1.RelationshipDeleteResponseValidationError.Error 0 17 3
A basev1.*RelationshipDeleteRequest.Validate 0 2 1
A basev1.BundleRunResponseMultiError.AllErrors 0 1 1
A basev1.PermissionCheckResponseValidationError.Key 0 1 1
A basev1.*PermissionCheckRequest.Validate 0 2 1
A basev1.BundleDeleteResponseMultiError.Error 0 6 2
A basev1.BundleReadResponseValidationError.Error 0 17 3
A basev1.DataDeleteRequestMultiError.AllErrors 0 1 1
A basev1.RelationshipReadResponseValidationError.Key 0 1 1
A basev1.TenantDeleteResponseValidationError.Key 0 1 1
A basev1.HealthRequestValidationError.Error 0 17 3
1
// Code generated by protoc-gen-validate. DO NOT EDIT.
2
// source: base/v1/service.proto
3
4
package basev1
5
6
import (
7
	"bytes"
8
	"errors"
9
	"fmt"
10
	"net"
11
	"net/mail"
12
	"net/url"
13
	"regexp"
14
	"sort"
15
	"strings"
16
	"time"
17
	"unicode/utf8"
18
19
	"google.golang.org/protobuf/types/known/anypb"
20
)
21
22
// ensure the imports are used
23
var (
24
	_ = bytes.MinRead
25
	_ = errors.New("")
26
	_ = fmt.Print
27
	_ = utf8.UTFMax
28
	_ = (*regexp.Regexp)(nil)
29
	_ = (*strings.Reader)(nil)
30
	_ = net.IPv4len
31
	_ = time.Duration(0)
32
	_ = (*url.URL)(nil)
33
	_ = (*mail.Address)(nil)
34
	_ = anypb.Any{}
35
	_ = sort.Sort
36
)
37
38
// Validate checks the field values on HealthRequest with the rules defined in
39
// the proto definition for this message. If any rules are violated, the first
40
// error encountered is returned, or nil if there are no violations.
41
func (m *HealthRequest) Validate() error {
42
	return m.validate(false)
43
}
44
45
// ValidateAll checks the field values on HealthRequest with the rules defined
46
// in the proto definition for this message. If any rules are violated, the
47
// result is a list of violation errors wrapped in HealthRequestMultiError, or
48
// nil if none found.
49
func (m *HealthRequest) ValidateAll() error {
50
	return m.validate(true)
51
}
52
53
func (m *HealthRequest) validate(all bool) error {
54
	if m == nil {
55
		return nil
56
	}
57
58
	var errors []error
59
60
	if len(errors) > 0 {
61
		return HealthRequestMultiError(errors)
62
	}
63
64
	return nil
65
}
66
67
// HealthRequestMultiError is an error wrapping multiple validation errors
68
// returned by HealthRequest.ValidateAll() if the designated constraints
69
// aren't met.
70
type HealthRequestMultiError []error
71
72
// Error returns a concatenation of all the error messages it wraps.
73
func (m HealthRequestMultiError) Error() string {
74
	var msgs []string
75
	for _, err := range m {
76
		msgs = append(msgs, err.Error())
77
	}
78
	return strings.Join(msgs, "; ")
79
}
80
81
// AllErrors returns a list of validation violation errors.
82
func (m HealthRequestMultiError) AllErrors() []error { return m }
83
84
// HealthRequestValidationError is the validation error returned by
85
// HealthRequest.Validate if the designated constraints aren't met.
86
type HealthRequestValidationError struct {
87
	field  string
88
	reason string
89
	cause  error
90
	key    bool
91
}
92
93
// Field function returns field value.
94
func (e HealthRequestValidationError) Field() string { return e.field }
95
96
// Reason function returns reason value.
97
func (e HealthRequestValidationError) Reason() string { return e.reason }
98
99
// Cause function returns cause value.
100
func (e HealthRequestValidationError) Cause() error { return e.cause }
101
102
// Key function returns key value.
103
func (e HealthRequestValidationError) Key() bool { return e.key }
104
105
// ErrorName returns error name.
106
func (e HealthRequestValidationError) ErrorName() string { return "HealthRequestValidationError" }
107
108
// Error satisfies the builtin error interface
109
func (e HealthRequestValidationError) Error() string {
110
	cause := ""
111
	if e.cause != nil {
112
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
113
	}
114
115
	key := ""
116
	if e.key {
117
		key = "key for "
118
	}
119
120
	return fmt.Sprintf(
121
		"invalid %sHealthRequest.%s: %s%s",
122
		key,
123
		e.field,
124
		e.reason,
125
		cause)
126
}
127
128
var _ error = HealthRequestValidationError{}
129
130
var _ interface {
131
	Field() string
132
	Reason() string
133
	Key() bool
134
	Cause() error
135
	ErrorName() string
136
} = HealthRequestValidationError{}
137
138
// Validate checks the field values on HealthResponse with the rules defined in
139
// the proto definition for this message. If any rules are violated, the first
140
// error encountered is returned, or nil if there are no violations.
141
func (m *HealthResponse) Validate() error {
142
	return m.validate(false)
143
}
144
145
// ValidateAll checks the field values on HealthResponse with the rules defined
146
// in the proto definition for this message. If any rules are violated, the
147
// result is a list of violation errors wrapped in HealthResponseMultiError,
148
// or nil if none found.
149
func (m *HealthResponse) ValidateAll() error {
150
	return m.validate(true)
151
}
152
153
func (m *HealthResponse) validate(all bool) error {
154
	if m == nil {
155
		return nil
156
	}
157
158
	var errors []error
159
160
	// no validation rules for Status
161
162
	if len(errors) > 0 {
163
		return HealthResponseMultiError(errors)
164
	}
165
166
	return nil
167
}
168
169
// HealthResponseMultiError is an error wrapping multiple validation errors
170
// returned by HealthResponse.ValidateAll() if the designated constraints
171
// aren't met.
172
type HealthResponseMultiError []error
173
174
// Error returns a concatenation of all the error messages it wraps.
175
func (m HealthResponseMultiError) Error() string {
176
	var msgs []string
177
	for _, err := range m {
178
		msgs = append(msgs, err.Error())
179
	}
180
	return strings.Join(msgs, "; ")
181
}
182
183
// AllErrors returns a list of validation violation errors.
184
func (m HealthResponseMultiError) AllErrors() []error { return m }
185
186
// HealthResponseValidationError is the validation error returned by
187
// HealthResponse.Validate if the designated constraints aren't met.
188
type HealthResponseValidationError struct {
189
	field  string
190
	reason string
191
	cause  error
192
	key    bool
193
}
194
195
// Field function returns field value.
196
func (e HealthResponseValidationError) Field() string { return e.field }
197
198
// Reason function returns reason value.
199
func (e HealthResponseValidationError) Reason() string { return e.reason }
200
201
// Cause function returns cause value.
202
func (e HealthResponseValidationError) Cause() error { return e.cause }
203
204
// Key function returns key value.
205
func (e HealthResponseValidationError) Key() bool { return e.key }
206
207
// ErrorName returns error name.
208
func (e HealthResponseValidationError) ErrorName() string { return "HealthResponseValidationError" }
209
210
// Error satisfies the builtin error interface
211
func (e HealthResponseValidationError) Error() string {
212
	cause := ""
213
	if e.cause != nil {
214
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
215
	}
216
217
	key := ""
218
	if e.key {
219
		key = "key for "
220
	}
221
222
	return fmt.Sprintf(
223
		"invalid %sHealthResponse.%s: %s%s",
224
		key,
225
		e.field,
226
		e.reason,
227
		cause)
228
}
229
230
var _ error = HealthResponseValidationError{}
231
232
var _ interface {
233
	Field() string
234
	Reason() string
235
	Key() bool
236
	Cause() error
237
	ErrorName() string
238
} = HealthResponseValidationError{}
239
240
// Validate checks the field values on PermissionCheckRequest with the rules
241
// defined in the proto definition for this message. If any rules are
242
// violated, the first error encountered is returned, or nil if there are no violations.
243
func (m *PermissionCheckRequest) Validate() error {
244
	return m.validate(false)
245
}
246
247
// ValidateAll checks the field values on PermissionCheckRequest with the rules
248
// defined in the proto definition for this message. If any rules are
249
// violated, the result is a list of violation errors wrapped in
250
// PermissionCheckRequestMultiError, or nil if none found.
251
func (m *PermissionCheckRequest) ValidateAll() error {
252
	return m.validate(true)
253
}
254
255
func (m *PermissionCheckRequest) validate(all bool) error {
256
	if m == nil {
257
		return nil
258
	}
259
260
	var errors []error
261
262
	if len(m.GetTenantId()) > 128 {
263
		err := PermissionCheckRequestValidationError{
264
			field:  "TenantId",
265
			reason: "value length must be at most 128 bytes",
266
		}
267
		if !all {
268
			return err
269
		}
270
		errors = append(errors, err)
271
	}
272
273
	if !_PermissionCheckRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
274
		err := PermissionCheckRequestValidationError{
275
			field:  "TenantId",
276
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
277
		}
278
		if !all {
279
			return err
280
		}
281
		errors = append(errors, err)
282
	}
283
284
	if m.GetMetadata() == nil {
285
		err := PermissionCheckRequestValidationError{
286
			field:  "Metadata",
287
			reason: "value is required",
288
		}
289
		if !all {
290
			return err
291
		}
292
		errors = append(errors, err)
293
	}
294
295
	if all {
296
		switch v := interface{}(m.GetMetadata()).(type) {
297
		case interface{ ValidateAll() error }:
298
			if err := v.ValidateAll(); err != nil {
299
				errors = append(errors, PermissionCheckRequestValidationError{
300
					field:  "Metadata",
301
					reason: "embedded message failed validation",
302
					cause:  err,
303
				})
304
			}
305
		case interface{ Validate() error }:
306
			if err := v.Validate(); err != nil {
307
				errors = append(errors, PermissionCheckRequestValidationError{
308
					field:  "Metadata",
309
					reason: "embedded message failed validation",
310
					cause:  err,
311
				})
312
			}
313
		}
314
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
315
		if err := v.Validate(); err != nil {
316
			return PermissionCheckRequestValidationError{
317
				field:  "Metadata",
318
				reason: "embedded message failed validation",
319
				cause:  err,
320
			}
321
		}
322
	}
323
324
	if m.GetEntity() == nil {
325
		err := PermissionCheckRequestValidationError{
326
			field:  "Entity",
327
			reason: "value is required",
328
		}
329
		if !all {
330
			return err
331
		}
332
		errors = append(errors, err)
333
	}
334
335
	if all {
336
		switch v := interface{}(m.GetEntity()).(type) {
337
		case interface{ ValidateAll() error }:
338
			if err := v.ValidateAll(); err != nil {
339
				errors = append(errors, PermissionCheckRequestValidationError{
340
					field:  "Entity",
341
					reason: "embedded message failed validation",
342
					cause:  err,
343
				})
344
			}
345
		case interface{ Validate() error }:
346
			if err := v.Validate(); err != nil {
347
				errors = append(errors, PermissionCheckRequestValidationError{
348
					field:  "Entity",
349
					reason: "embedded message failed validation",
350
					cause:  err,
351
				})
352
			}
353
		}
354
	} else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
355
		if err := v.Validate(); err != nil {
356
			return PermissionCheckRequestValidationError{
357
				field:  "Entity",
358
				reason: "embedded message failed validation",
359
				cause:  err,
360
			}
361
		}
362
	}
363
364
	if len(m.GetPermission()) > 64 {
365
		err := PermissionCheckRequestValidationError{
366
			field:  "Permission",
367
			reason: "value length must be at most 64 bytes",
368
		}
369
		if !all {
370
			return err
371
		}
372
		errors = append(errors, err)
373
	}
374
375
	if !_PermissionCheckRequest_Permission_Pattern.MatchString(m.GetPermission()) {
376
		err := PermissionCheckRequestValidationError{
377
			field:  "Permission",
378
			reason: "value does not match regex pattern \"^[a-zA-Z_]{1,64}$\"",
379
		}
380
		if !all {
381
			return err
382
		}
383
		errors = append(errors, err)
384
	}
385
386
	if m.GetSubject() == nil {
387
		err := PermissionCheckRequestValidationError{
388
			field:  "Subject",
389
			reason: "value is required",
390
		}
391
		if !all {
392
			return err
393
		}
394
		errors = append(errors, err)
395
	}
396
397
	if all {
398
		switch v := interface{}(m.GetSubject()).(type) {
399
		case interface{ ValidateAll() error }:
400
			if err := v.ValidateAll(); err != nil {
401
				errors = append(errors, PermissionCheckRequestValidationError{
402
					field:  "Subject",
403
					reason: "embedded message failed validation",
404
					cause:  err,
405
				})
406
			}
407
		case interface{ Validate() error }:
408
			if err := v.Validate(); err != nil {
409
				errors = append(errors, PermissionCheckRequestValidationError{
410
					field:  "Subject",
411
					reason: "embedded message failed validation",
412
					cause:  err,
413
				})
414
			}
415
		}
416
	} else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
417
		if err := v.Validate(); err != nil {
418
			return PermissionCheckRequestValidationError{
419
				field:  "Subject",
420
				reason: "embedded message failed validation",
421
				cause:  err,
422
			}
423
		}
424
	}
425
426
	if all {
427
		switch v := interface{}(m.GetContext()).(type) {
428
		case interface{ ValidateAll() error }:
429
			if err := v.ValidateAll(); err != nil {
430
				errors = append(errors, PermissionCheckRequestValidationError{
431
					field:  "Context",
432
					reason: "embedded message failed validation",
433
					cause:  err,
434
				})
435
			}
436
		case interface{ Validate() error }:
437
			if err := v.Validate(); err != nil {
438
				errors = append(errors, PermissionCheckRequestValidationError{
439
					field:  "Context",
440
					reason: "embedded message failed validation",
441
					cause:  err,
442
				})
443
			}
444
		}
445
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
446
		if err := v.Validate(); err != nil {
447
			return PermissionCheckRequestValidationError{
448
				field:  "Context",
449
				reason: "embedded message failed validation",
450
				cause:  err,
451
			}
452
		}
453
	}
454
455
	for idx, item := range m.GetArguments() {
456
		_, _ = idx, item
457
458
		if all {
459
			switch v := interface{}(item).(type) {
460
			case interface{ ValidateAll() error }:
461
				if err := v.ValidateAll(); err != nil {
462
					errors = append(errors, PermissionCheckRequestValidationError{
463
						field:  fmt.Sprintf("Arguments[%v]", idx),
464
						reason: "embedded message failed validation",
465
						cause:  err,
466
					})
467
				}
468
			case interface{ Validate() error }:
469
				if err := v.Validate(); err != nil {
470
					errors = append(errors, PermissionCheckRequestValidationError{
471
						field:  fmt.Sprintf("Arguments[%v]", idx),
472
						reason: "embedded message failed validation",
473
						cause:  err,
474
					})
475
				}
476
			}
477
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
478
			if err := v.Validate(); err != nil {
479
				return PermissionCheckRequestValidationError{
480
					field:  fmt.Sprintf("Arguments[%v]", idx),
481
					reason: "embedded message failed validation",
482
					cause:  err,
483
				}
484
			}
485
		}
486
487
	}
488
489
	if len(errors) > 0 {
490
		return PermissionCheckRequestMultiError(errors)
491
	}
492
493
	return nil
494
}
495
496
// PermissionCheckRequestMultiError is an error wrapping multiple validation
497
// errors returned by PermissionCheckRequest.ValidateAll() if the designated
498
// constraints aren't met.
499
type PermissionCheckRequestMultiError []error
500
501
// Error returns a concatenation of all the error messages it wraps.
502
func (m PermissionCheckRequestMultiError) Error() string {
503
	var msgs []string
504
	for _, err := range m {
505
		msgs = append(msgs, err.Error())
506
	}
507
	return strings.Join(msgs, "; ")
508
}
509
510
// AllErrors returns a list of validation violation errors.
511
func (m PermissionCheckRequestMultiError) AllErrors() []error { return m }
512
513
// PermissionCheckRequestValidationError is the validation error returned by
514
// PermissionCheckRequest.Validate if the designated constraints aren't met.
515
type PermissionCheckRequestValidationError struct {
516
	field  string
517
	reason string
518
	cause  error
519
	key    bool
520
}
521
522
// Field function returns field value.
523
func (e PermissionCheckRequestValidationError) Field() string { return e.field }
524
525
// Reason function returns reason value.
526
func (e PermissionCheckRequestValidationError) Reason() string { return e.reason }
527
528
// Cause function returns cause value.
529
func (e PermissionCheckRequestValidationError) Cause() error { return e.cause }
530
531
// Key function returns key value.
532
func (e PermissionCheckRequestValidationError) Key() bool { return e.key }
533
534
// ErrorName returns error name.
535
func (e PermissionCheckRequestValidationError) ErrorName() string {
536
	return "PermissionCheckRequestValidationError"
537
}
538
539
// Error satisfies the builtin error interface
540
func (e PermissionCheckRequestValidationError) Error() string {
541
	cause := ""
542
	if e.cause != nil {
543
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
544
	}
545
546
	key := ""
547
	if e.key {
548
		key = "key for "
549
	}
550
551
	return fmt.Sprintf(
552
		"invalid %sPermissionCheckRequest.%s: %s%s",
553
		key,
554
		e.field,
555
		e.reason,
556
		cause)
557
}
558
559
var _ error = PermissionCheckRequestValidationError{}
560
561
var _ interface {
562
	Field() string
563
	Reason() string
564
	Key() bool
565
	Cause() error
566
	ErrorName() string
567
} = PermissionCheckRequestValidationError{}
568
569
var _PermissionCheckRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
570
571
var _PermissionCheckRequest_Permission_Pattern = regexp.MustCompile("^[a-zA-Z_]{1,64}$")
572
573
// Validate checks the field values on PermissionCheckRequestMetadata with the
574
// rules defined in the proto definition for this message. If any rules are
575
// violated, the first error encountered is returned, or nil if there are no violations.
576
func (m *PermissionCheckRequestMetadata) Validate() error {
577
	return m.validate(false)
578
}
579
580
// ValidateAll checks the field values on PermissionCheckRequestMetadata with
581
// the rules defined in the proto definition for this message. If any rules
582
// are violated, the result is a list of violation errors wrapped in
583
// PermissionCheckRequestMetadataMultiError, or nil if none found.
584
func (m *PermissionCheckRequestMetadata) ValidateAll() error {
585
	return m.validate(true)
586
}
587
588
func (m *PermissionCheckRequestMetadata) validate(all bool) error {
589
	if m == nil {
590
		return nil
591
	}
592
593
	var errors []error
594
595
	// no validation rules for SchemaVersion
596
597
	// no validation rules for SnapToken
598
599
	if m.GetDepth() < 3 {
600
		err := PermissionCheckRequestMetadataValidationError{
601
			field:  "Depth",
602
			reason: "value must be greater than or equal to 3",
603
		}
604
		if !all {
605
			return err
606
		}
607
		errors = append(errors, err)
608
	}
609
610
	if len(errors) > 0 {
611
		return PermissionCheckRequestMetadataMultiError(errors)
612
	}
613
614
	return nil
615
}
616
617
// PermissionCheckRequestMetadataMultiError is an error wrapping multiple
618
// validation errors returned by PermissionCheckRequestMetadata.ValidateAll()
619
// if the designated constraints aren't met.
620
type PermissionCheckRequestMetadataMultiError []error
621
622
// Error returns a concatenation of all the error messages it wraps.
623
func (m PermissionCheckRequestMetadataMultiError) Error() string {
624
	var msgs []string
625
	for _, err := range m {
626
		msgs = append(msgs, err.Error())
627
	}
628
	return strings.Join(msgs, "; ")
629
}
630
631
// AllErrors returns a list of validation violation errors.
632
func (m PermissionCheckRequestMetadataMultiError) AllErrors() []error { return m }
633
634
// PermissionCheckRequestMetadataValidationError is the validation error
635
// returned by PermissionCheckRequestMetadata.Validate if the designated
636
// constraints aren't met.
637
type PermissionCheckRequestMetadataValidationError struct {
638
	field  string
639
	reason string
640
	cause  error
641
	key    bool
642
}
643
644
// Field function returns field value.
645
func (e PermissionCheckRequestMetadataValidationError) Field() string { return e.field }
646
647
// Reason function returns reason value.
648
func (e PermissionCheckRequestMetadataValidationError) Reason() string { return e.reason }
649
650
// Cause function returns cause value.
651
func (e PermissionCheckRequestMetadataValidationError) Cause() error { return e.cause }
652
653
// Key function returns key value.
654
func (e PermissionCheckRequestMetadataValidationError) Key() bool { return e.key }
655
656
// ErrorName returns error name.
657
func (e PermissionCheckRequestMetadataValidationError) ErrorName() string {
658
	return "PermissionCheckRequestMetadataValidationError"
659
}
660
661
// Error satisfies the builtin error interface
662
func (e PermissionCheckRequestMetadataValidationError) Error() string {
663
	cause := ""
664
	if e.cause != nil {
665
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
666
	}
667
668
	key := ""
669
	if e.key {
670
		key = "key for "
671
	}
672
673
	return fmt.Sprintf(
674
		"invalid %sPermissionCheckRequestMetadata.%s: %s%s",
675
		key,
676
		e.field,
677
		e.reason,
678
		cause)
679
}
680
681
var _ error = PermissionCheckRequestMetadataValidationError{}
682
683
var _ interface {
684
	Field() string
685
	Reason() string
686
	Key() bool
687
	Cause() error
688
	ErrorName() string
689
} = PermissionCheckRequestMetadataValidationError{}
690
691
// Validate checks the field values on PermissionCheckResponse with the rules
692
// defined in the proto definition for this message. If any rules are
693
// violated, the first error encountered is returned, or nil if there are no violations.
694
func (m *PermissionCheckResponse) Validate() error {
695
	return m.validate(false)
696
}
697
698
// ValidateAll checks the field values on PermissionCheckResponse with the
699
// rules defined in the proto definition for this message. If any rules are
700
// violated, the result is a list of violation errors wrapped in
701
// PermissionCheckResponseMultiError, or nil if none found.
702
func (m *PermissionCheckResponse) ValidateAll() error {
703
	return m.validate(true)
704
}
705
706
func (m *PermissionCheckResponse) validate(all bool) error {
707
	if m == nil {
708
		return nil
709
	}
710
711
	var errors []error
712
713
	// no validation rules for Can
714
715
	if all {
716
		switch v := interface{}(m.GetMetadata()).(type) {
717
		case interface{ ValidateAll() error }:
718
			if err := v.ValidateAll(); err != nil {
719
				errors = append(errors, PermissionCheckResponseValidationError{
720
					field:  "Metadata",
721
					reason: "embedded message failed validation",
722
					cause:  err,
723
				})
724
			}
725
		case interface{ Validate() error }:
726
			if err := v.Validate(); err != nil {
727
				errors = append(errors, PermissionCheckResponseValidationError{
728
					field:  "Metadata",
729
					reason: "embedded message failed validation",
730
					cause:  err,
731
				})
732
			}
733
		}
734
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
735
		if err := v.Validate(); err != nil {
736
			return PermissionCheckResponseValidationError{
737
				field:  "Metadata",
738
				reason: "embedded message failed validation",
739
				cause:  err,
740
			}
741
		}
742
	}
743
744
	if len(errors) > 0 {
745
		return PermissionCheckResponseMultiError(errors)
746
	}
747
748
	return nil
749
}
750
751
// PermissionCheckResponseMultiError is an error wrapping multiple validation
752
// errors returned by PermissionCheckResponse.ValidateAll() if the designated
753
// constraints aren't met.
754
type PermissionCheckResponseMultiError []error
755
756
// Error returns a concatenation of all the error messages it wraps.
757
func (m PermissionCheckResponseMultiError) Error() string {
758
	var msgs []string
759
	for _, err := range m {
760
		msgs = append(msgs, err.Error())
761
	}
762
	return strings.Join(msgs, "; ")
763
}
764
765
// AllErrors returns a list of validation violation errors.
766
func (m PermissionCheckResponseMultiError) AllErrors() []error { return m }
767
768
// PermissionCheckResponseValidationError is the validation error returned by
769
// PermissionCheckResponse.Validate if the designated constraints aren't met.
770
type PermissionCheckResponseValidationError struct {
771
	field  string
772
	reason string
773
	cause  error
774
	key    bool
775
}
776
777
// Field function returns field value.
778
func (e PermissionCheckResponseValidationError) Field() string { return e.field }
779
780
// Reason function returns reason value.
781
func (e PermissionCheckResponseValidationError) Reason() string { return e.reason }
782
783
// Cause function returns cause value.
784
func (e PermissionCheckResponseValidationError) Cause() error { return e.cause }
785
786
// Key function returns key value.
787
func (e PermissionCheckResponseValidationError) Key() bool { return e.key }
788
789
// ErrorName returns error name.
790
func (e PermissionCheckResponseValidationError) ErrorName() string {
791
	return "PermissionCheckResponseValidationError"
792
}
793
794
// Error satisfies the builtin error interface
795
func (e PermissionCheckResponseValidationError) Error() string {
796
	cause := ""
797
	if e.cause != nil {
798
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
799
	}
800
801
	key := ""
802
	if e.key {
803
		key = "key for "
804
	}
805
806
	return fmt.Sprintf(
807
		"invalid %sPermissionCheckResponse.%s: %s%s",
808
		key,
809
		e.field,
810
		e.reason,
811
		cause)
812
}
813
814
var _ error = PermissionCheckResponseValidationError{}
815
816
var _ interface {
817
	Field() string
818
	Reason() string
819
	Key() bool
820
	Cause() error
821
	ErrorName() string
822
} = PermissionCheckResponseValidationError{}
823
824
// Validate checks the field values on PermissionCheckResponseMetadata with the
825
// rules defined in the proto definition for this message. If any rules are
826
// violated, the first error encountered is returned, or nil if there are no violations.
827
func (m *PermissionCheckResponseMetadata) Validate() error {
828
	return m.validate(false)
829
}
830
831
// ValidateAll checks the field values on PermissionCheckResponseMetadata with
832
// the rules defined in the proto definition for this message. If any rules
833
// are violated, the result is a list of violation errors wrapped in
834
// PermissionCheckResponseMetadataMultiError, or nil if none found.
835
func (m *PermissionCheckResponseMetadata) ValidateAll() error {
836
	return m.validate(true)
837
}
838
839
func (m *PermissionCheckResponseMetadata) validate(all bool) error {
840
	if m == nil {
841
		return nil
842
	}
843
844
	var errors []error
845
846
	// no validation rules for CheckCount
847
848
	if len(errors) > 0 {
849
		return PermissionCheckResponseMetadataMultiError(errors)
850
	}
851
852
	return nil
853
}
854
855
// PermissionCheckResponseMetadataMultiError is an error wrapping multiple
856
// validation errors returned by PermissionCheckResponseMetadata.ValidateAll()
857
// if the designated constraints aren't met.
858
type PermissionCheckResponseMetadataMultiError []error
859
860
// Error returns a concatenation of all the error messages it wraps.
861
func (m PermissionCheckResponseMetadataMultiError) Error() string {
862
	var msgs []string
863
	for _, err := range m {
864
		msgs = append(msgs, err.Error())
865
	}
866
	return strings.Join(msgs, "; ")
867
}
868
869
// AllErrors returns a list of validation violation errors.
870
func (m PermissionCheckResponseMetadataMultiError) AllErrors() []error { return m }
871
872
// PermissionCheckResponseMetadataValidationError is the validation error
873
// returned by PermissionCheckResponseMetadata.Validate if the designated
874
// constraints aren't met.
875
type PermissionCheckResponseMetadataValidationError struct {
876
	field  string
877
	reason string
878
	cause  error
879
	key    bool
880
}
881
882
// Field function returns field value.
883
func (e PermissionCheckResponseMetadataValidationError) Field() string { return e.field }
884
885
// Reason function returns reason value.
886
func (e PermissionCheckResponseMetadataValidationError) Reason() string { return e.reason }
887
888
// Cause function returns cause value.
889
func (e PermissionCheckResponseMetadataValidationError) Cause() error { return e.cause }
890
891
// Key function returns key value.
892
func (e PermissionCheckResponseMetadataValidationError) Key() bool { return e.key }
893
894
// ErrorName returns error name.
895
func (e PermissionCheckResponseMetadataValidationError) ErrorName() string {
896
	return "PermissionCheckResponseMetadataValidationError"
897
}
898
899
// Error satisfies the builtin error interface
900
func (e PermissionCheckResponseMetadataValidationError) Error() string {
901
	cause := ""
902
	if e.cause != nil {
903
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
904
	}
905
906
	key := ""
907
	if e.key {
908
		key = "key for "
909
	}
910
911
	return fmt.Sprintf(
912
		"invalid %sPermissionCheckResponseMetadata.%s: %s%s",
913
		key,
914
		e.field,
915
		e.reason,
916
		cause)
917
}
918
919
var _ error = PermissionCheckResponseMetadataValidationError{}
920
921
var _ interface {
922
	Field() string
923
	Reason() string
924
	Key() bool
925
	Cause() error
926
	ErrorName() string
927
} = PermissionCheckResponseMetadataValidationError{}
928
929
// Validate checks the field values on PermissionExpandRequest with the rules
930
// defined in the proto definition for this message. If any rules are
931
// violated, the first error encountered is returned, or nil if there are no violations.
932
func (m *PermissionExpandRequest) Validate() error {
933
	return m.validate(false)
934
}
935
936
// ValidateAll checks the field values on PermissionExpandRequest with the
937
// rules defined in the proto definition for this message. If any rules are
938
// violated, the result is a list of violation errors wrapped in
939
// PermissionExpandRequestMultiError, or nil if none found.
940
func (m *PermissionExpandRequest) ValidateAll() error {
941
	return m.validate(true)
942
}
943
944
func (m *PermissionExpandRequest) validate(all bool) error {
945
	if m == nil {
946
		return nil
947
	}
948
949
	var errors []error
950
951
	if len(m.GetTenantId()) > 128 {
952
		err := PermissionExpandRequestValidationError{
953
			field:  "TenantId",
954
			reason: "value length must be at most 128 bytes",
955
		}
956
		if !all {
957
			return err
958
		}
959
		errors = append(errors, err)
960
	}
961
962
	if !_PermissionExpandRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
963
		err := PermissionExpandRequestValidationError{
964
			field:  "TenantId",
965
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
966
		}
967
		if !all {
968
			return err
969
		}
970
		errors = append(errors, err)
971
	}
972
973
	if m.GetMetadata() == nil {
974
		err := PermissionExpandRequestValidationError{
975
			field:  "Metadata",
976
			reason: "value is required",
977
		}
978
		if !all {
979
			return err
980
		}
981
		errors = append(errors, err)
982
	}
983
984
	if all {
985
		switch v := interface{}(m.GetMetadata()).(type) {
986
		case interface{ ValidateAll() error }:
987
			if err := v.ValidateAll(); err != nil {
988
				errors = append(errors, PermissionExpandRequestValidationError{
989
					field:  "Metadata",
990
					reason: "embedded message failed validation",
991
					cause:  err,
992
				})
993
			}
994
		case interface{ Validate() error }:
995
			if err := v.Validate(); err != nil {
996
				errors = append(errors, PermissionExpandRequestValidationError{
997
					field:  "Metadata",
998
					reason: "embedded message failed validation",
999
					cause:  err,
1000
				})
1001
			}
1002
		}
1003
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
1004
		if err := v.Validate(); err != nil {
1005
			return PermissionExpandRequestValidationError{
1006
				field:  "Metadata",
1007
				reason: "embedded message failed validation",
1008
				cause:  err,
1009
			}
1010
		}
1011
	}
1012
1013
	if m.GetEntity() == nil {
1014
		err := PermissionExpandRequestValidationError{
1015
			field:  "Entity",
1016
			reason: "value is required",
1017
		}
1018
		if !all {
1019
			return err
1020
		}
1021
		errors = append(errors, err)
1022
	}
1023
1024
	if all {
1025
		switch v := interface{}(m.GetEntity()).(type) {
1026
		case interface{ ValidateAll() error }:
1027
			if err := v.ValidateAll(); err != nil {
1028
				errors = append(errors, PermissionExpandRequestValidationError{
1029
					field:  "Entity",
1030
					reason: "embedded message failed validation",
1031
					cause:  err,
1032
				})
1033
			}
1034
		case interface{ Validate() error }:
1035
			if err := v.Validate(); err != nil {
1036
				errors = append(errors, PermissionExpandRequestValidationError{
1037
					field:  "Entity",
1038
					reason: "embedded message failed validation",
1039
					cause:  err,
1040
				})
1041
			}
1042
		}
1043
	} else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
1044
		if err := v.Validate(); err != nil {
1045
			return PermissionExpandRequestValidationError{
1046
				field:  "Entity",
1047
				reason: "embedded message failed validation",
1048
				cause:  err,
1049
			}
1050
		}
1051
	}
1052
1053
	if m.GetPermission() != "" {
1054
1055
		if len(m.GetPermission()) > 64 {
1056
			err := PermissionExpandRequestValidationError{
1057
				field:  "Permission",
1058
				reason: "value length must be at most 64 bytes",
1059
			}
1060
			if !all {
1061
				return err
1062
			}
1063
			errors = append(errors, err)
1064
		}
1065
1066
		if !_PermissionExpandRequest_Permission_Pattern.MatchString(m.GetPermission()) {
1067
			err := PermissionExpandRequestValidationError{
1068
				field:  "Permission",
1069
				reason: "value does not match regex pattern \"^[a-zA-Z_]{1,64}$\"",
1070
			}
1071
			if !all {
1072
				return err
1073
			}
1074
			errors = append(errors, err)
1075
		}
1076
1077
	}
1078
1079
	if all {
1080
		switch v := interface{}(m.GetContext()).(type) {
1081
		case interface{ ValidateAll() error }:
1082
			if err := v.ValidateAll(); err != nil {
1083
				errors = append(errors, PermissionExpandRequestValidationError{
1084
					field:  "Context",
1085
					reason: "embedded message failed validation",
1086
					cause:  err,
1087
				})
1088
			}
1089
		case interface{ Validate() error }:
1090
			if err := v.Validate(); err != nil {
1091
				errors = append(errors, PermissionExpandRequestValidationError{
1092
					field:  "Context",
1093
					reason: "embedded message failed validation",
1094
					cause:  err,
1095
				})
1096
			}
1097
		}
1098
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
1099
		if err := v.Validate(); err != nil {
1100
			return PermissionExpandRequestValidationError{
1101
				field:  "Context",
1102
				reason: "embedded message failed validation",
1103
				cause:  err,
1104
			}
1105
		}
1106
	}
1107
1108
	for idx, item := range m.GetArguments() {
1109
		_, _ = idx, item
1110
1111
		if all {
1112
			switch v := interface{}(item).(type) {
1113
			case interface{ ValidateAll() error }:
1114
				if err := v.ValidateAll(); err != nil {
1115
					errors = append(errors, PermissionExpandRequestValidationError{
1116
						field:  fmt.Sprintf("Arguments[%v]", idx),
1117
						reason: "embedded message failed validation",
1118
						cause:  err,
1119
					})
1120
				}
1121
			case interface{ Validate() error }:
1122
				if err := v.Validate(); err != nil {
1123
					errors = append(errors, PermissionExpandRequestValidationError{
1124
						field:  fmt.Sprintf("Arguments[%v]", idx),
1125
						reason: "embedded message failed validation",
1126
						cause:  err,
1127
					})
1128
				}
1129
			}
1130
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
1131
			if err := v.Validate(); err != nil {
1132
				return PermissionExpandRequestValidationError{
1133
					field:  fmt.Sprintf("Arguments[%v]", idx),
1134
					reason: "embedded message failed validation",
1135
					cause:  err,
1136
				}
1137
			}
1138
		}
1139
1140
	}
1141
1142
	if len(errors) > 0 {
1143
		return PermissionExpandRequestMultiError(errors)
1144
	}
1145
1146
	return nil
1147
}
1148
1149
// PermissionExpandRequestMultiError is an error wrapping multiple validation
1150
// errors returned by PermissionExpandRequest.ValidateAll() if the designated
1151
// constraints aren't met.
1152
type PermissionExpandRequestMultiError []error
1153
1154
// Error returns a concatenation of all the error messages it wraps.
1155
func (m PermissionExpandRequestMultiError) Error() string {
1156
	var msgs []string
1157
	for _, err := range m {
1158
		msgs = append(msgs, err.Error())
1159
	}
1160
	return strings.Join(msgs, "; ")
1161
}
1162
1163
// AllErrors returns a list of validation violation errors.
1164
func (m PermissionExpandRequestMultiError) AllErrors() []error { return m }
1165
1166
// PermissionExpandRequestValidationError is the validation error returned by
1167
// PermissionExpandRequest.Validate if the designated constraints aren't met.
1168
type PermissionExpandRequestValidationError struct {
1169
	field  string
1170
	reason string
1171
	cause  error
1172
	key    bool
1173
}
1174
1175
// Field function returns field value.
1176
func (e PermissionExpandRequestValidationError) Field() string { return e.field }
1177
1178
// Reason function returns reason value.
1179
func (e PermissionExpandRequestValidationError) Reason() string { return e.reason }
1180
1181
// Cause function returns cause value.
1182
func (e PermissionExpandRequestValidationError) Cause() error { return e.cause }
1183
1184
// Key function returns key value.
1185
func (e PermissionExpandRequestValidationError) Key() bool { return e.key }
1186
1187
// ErrorName returns error name.
1188
func (e PermissionExpandRequestValidationError) ErrorName() string {
1189
	return "PermissionExpandRequestValidationError"
1190
}
1191
1192
// Error satisfies the builtin error interface
1193
func (e PermissionExpandRequestValidationError) Error() string {
1194
	cause := ""
1195
	if e.cause != nil {
1196
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1197
	}
1198
1199
	key := ""
1200
	if e.key {
1201
		key = "key for "
1202
	}
1203
1204
	return fmt.Sprintf(
1205
		"invalid %sPermissionExpandRequest.%s: %s%s",
1206
		key,
1207
		e.field,
1208
		e.reason,
1209
		cause)
1210
}
1211
1212
var _ error = PermissionExpandRequestValidationError{}
1213
1214
var _ interface {
1215
	Field() string
1216
	Reason() string
1217
	Key() bool
1218
	Cause() error
1219
	ErrorName() string
1220
} = PermissionExpandRequestValidationError{}
1221
1222
var _PermissionExpandRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
1223
1224
var _PermissionExpandRequest_Permission_Pattern = regexp.MustCompile("^[a-zA-Z_]{1,64}$")
1225
1226
// Validate checks the field values on PermissionExpandRequestMetadata with the
1227
// rules defined in the proto definition for this message. If any rules are
1228
// violated, the first error encountered is returned, or nil if there are no violations.
1229
func (m *PermissionExpandRequestMetadata) Validate() error {
1230
	return m.validate(false)
1231
}
1232
1233
// ValidateAll checks the field values on PermissionExpandRequestMetadata with
1234
// the rules defined in the proto definition for this message. If any rules
1235
// are violated, the result is a list of violation errors wrapped in
1236
// PermissionExpandRequestMetadataMultiError, or nil if none found.
1237
func (m *PermissionExpandRequestMetadata) ValidateAll() error {
1238
	return m.validate(true)
1239
}
1240
1241
func (m *PermissionExpandRequestMetadata) validate(all bool) error {
1242
	if m == nil {
1243
		return nil
1244
	}
1245
1246
	var errors []error
1247
1248
	// no validation rules for SchemaVersion
1249
1250
	// no validation rules for SnapToken
1251
1252
	if len(errors) > 0 {
1253
		return PermissionExpandRequestMetadataMultiError(errors)
1254
	}
1255
1256
	return nil
1257
}
1258
1259
// PermissionExpandRequestMetadataMultiError is an error wrapping multiple
1260
// validation errors returned by PermissionExpandRequestMetadata.ValidateAll()
1261
// if the designated constraints aren't met.
1262
type PermissionExpandRequestMetadataMultiError []error
1263
1264
// Error returns a concatenation of all the error messages it wraps.
1265
func (m PermissionExpandRequestMetadataMultiError) Error() string {
1266
	var msgs []string
1267
	for _, err := range m {
1268
		msgs = append(msgs, err.Error())
1269
	}
1270
	return strings.Join(msgs, "; ")
1271
}
1272
1273
// AllErrors returns a list of validation violation errors.
1274
func (m PermissionExpandRequestMetadataMultiError) AllErrors() []error { return m }
1275
1276
// PermissionExpandRequestMetadataValidationError is the validation error
1277
// returned by PermissionExpandRequestMetadata.Validate if the designated
1278
// constraints aren't met.
1279
type PermissionExpandRequestMetadataValidationError struct {
1280
	field  string
1281
	reason string
1282
	cause  error
1283
	key    bool
1284
}
1285
1286
// Field function returns field value.
1287
func (e PermissionExpandRequestMetadataValidationError) Field() string { return e.field }
1288
1289
// Reason function returns reason value.
1290
func (e PermissionExpandRequestMetadataValidationError) Reason() string { return e.reason }
1291
1292
// Cause function returns cause value.
1293
func (e PermissionExpandRequestMetadataValidationError) Cause() error { return e.cause }
1294
1295
// Key function returns key value.
1296
func (e PermissionExpandRequestMetadataValidationError) Key() bool { return e.key }
1297
1298
// ErrorName returns error name.
1299
func (e PermissionExpandRequestMetadataValidationError) ErrorName() string {
1300
	return "PermissionExpandRequestMetadataValidationError"
1301
}
1302
1303
// Error satisfies the builtin error interface
1304
func (e PermissionExpandRequestMetadataValidationError) Error() string {
1305
	cause := ""
1306
	if e.cause != nil {
1307
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1308
	}
1309
1310
	key := ""
1311
	if e.key {
1312
		key = "key for "
1313
	}
1314
1315
	return fmt.Sprintf(
1316
		"invalid %sPermissionExpandRequestMetadata.%s: %s%s",
1317
		key,
1318
		e.field,
1319
		e.reason,
1320
		cause)
1321
}
1322
1323
var _ error = PermissionExpandRequestMetadataValidationError{}
1324
1325
var _ interface {
1326
	Field() string
1327
	Reason() string
1328
	Key() bool
1329
	Cause() error
1330
	ErrorName() string
1331
} = PermissionExpandRequestMetadataValidationError{}
1332
1333
// Validate checks the field values on PermissionExpandResponse with the rules
1334
// defined in the proto definition for this message. If any rules are
1335
// violated, the first error encountered is returned, or nil if there are no violations.
1336
func (m *PermissionExpandResponse) Validate() error {
1337
	return m.validate(false)
1338
}
1339
1340
// ValidateAll checks the field values on PermissionExpandResponse with the
1341
// rules defined in the proto definition for this message. If any rules are
1342
// violated, the result is a list of violation errors wrapped in
1343
// PermissionExpandResponseMultiError, or nil if none found.
1344
func (m *PermissionExpandResponse) ValidateAll() error {
1345
	return m.validate(true)
1346
}
1347
1348
func (m *PermissionExpandResponse) validate(all bool) error {
1349
	if m == nil {
1350
		return nil
1351
	}
1352
1353
	var errors []error
1354
1355
	if all {
1356
		switch v := interface{}(m.GetTree()).(type) {
1357
		case interface{ ValidateAll() error }:
1358
			if err := v.ValidateAll(); err != nil {
1359
				errors = append(errors, PermissionExpandResponseValidationError{
1360
					field:  "Tree",
1361
					reason: "embedded message failed validation",
1362
					cause:  err,
1363
				})
1364
			}
1365
		case interface{ Validate() error }:
1366
			if err := v.Validate(); err != nil {
1367
				errors = append(errors, PermissionExpandResponseValidationError{
1368
					field:  "Tree",
1369
					reason: "embedded message failed validation",
1370
					cause:  err,
1371
				})
1372
			}
1373
		}
1374
	} else if v, ok := interface{}(m.GetTree()).(interface{ Validate() error }); ok {
1375
		if err := v.Validate(); err != nil {
1376
			return PermissionExpandResponseValidationError{
1377
				field:  "Tree",
1378
				reason: "embedded message failed validation",
1379
				cause:  err,
1380
			}
1381
		}
1382
	}
1383
1384
	if len(errors) > 0 {
1385
		return PermissionExpandResponseMultiError(errors)
1386
	}
1387
1388
	return nil
1389
}
1390
1391
// PermissionExpandResponseMultiError is an error wrapping multiple validation
1392
// errors returned by PermissionExpandResponse.ValidateAll() if the designated
1393
// constraints aren't met.
1394
type PermissionExpandResponseMultiError []error
1395
1396
// Error returns a concatenation of all the error messages it wraps.
1397
func (m PermissionExpandResponseMultiError) Error() string {
1398
	var msgs []string
1399
	for _, err := range m {
1400
		msgs = append(msgs, err.Error())
1401
	}
1402
	return strings.Join(msgs, "; ")
1403
}
1404
1405
// AllErrors returns a list of validation violation errors.
1406
func (m PermissionExpandResponseMultiError) AllErrors() []error { return m }
1407
1408
// PermissionExpandResponseValidationError is the validation error returned by
1409
// PermissionExpandResponse.Validate if the designated constraints aren't met.
1410
type PermissionExpandResponseValidationError struct {
1411
	field  string
1412
	reason string
1413
	cause  error
1414
	key    bool
1415
}
1416
1417
// Field function returns field value.
1418
func (e PermissionExpandResponseValidationError) Field() string { return e.field }
1419
1420
// Reason function returns reason value.
1421
func (e PermissionExpandResponseValidationError) Reason() string { return e.reason }
1422
1423
// Cause function returns cause value.
1424
func (e PermissionExpandResponseValidationError) Cause() error { return e.cause }
1425
1426
// Key function returns key value.
1427
func (e PermissionExpandResponseValidationError) Key() bool { return e.key }
1428
1429
// ErrorName returns error name.
1430
func (e PermissionExpandResponseValidationError) ErrorName() string {
1431
	return "PermissionExpandResponseValidationError"
1432
}
1433
1434
// Error satisfies the builtin error interface
1435
func (e PermissionExpandResponseValidationError) Error() string {
1436
	cause := ""
1437
	if e.cause != nil {
1438
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1439
	}
1440
1441
	key := ""
1442
	if e.key {
1443
		key = "key for "
1444
	}
1445
1446
	return fmt.Sprintf(
1447
		"invalid %sPermissionExpandResponse.%s: %s%s",
1448
		key,
1449
		e.field,
1450
		e.reason,
1451
		cause)
1452
}
1453
1454
var _ error = PermissionExpandResponseValidationError{}
1455
1456
var _ interface {
1457
	Field() string
1458
	Reason() string
1459
	Key() bool
1460
	Cause() error
1461
	ErrorName() string
1462
} = PermissionExpandResponseValidationError{}
1463
1464
// Validate checks the field values on PermissionLookupEntityRequest with the
1465
// rules defined in the proto definition for this message. If any rules are
1466
// violated, the first error encountered is returned, or nil if there are no violations.
1467
func (m *PermissionLookupEntityRequest) Validate() error {
1468
	return m.validate(false)
1469
}
1470
1471
// ValidateAll checks the field values on PermissionLookupEntityRequest with
1472
// the rules defined in the proto definition for this message. If any rules
1473
// are violated, the result is a list of violation errors wrapped in
1474
// PermissionLookupEntityRequestMultiError, or nil if none found.
1475
func (m *PermissionLookupEntityRequest) ValidateAll() error {
1476
	return m.validate(true)
1477
}
1478
1479
func (m *PermissionLookupEntityRequest) validate(all bool) error {
1480
	if m == nil {
1481
		return nil
1482
	}
1483
1484
	var errors []error
1485
1486
	if len(m.GetTenantId()) > 128 {
1487
		err := PermissionLookupEntityRequestValidationError{
1488
			field:  "TenantId",
1489
			reason: "value length must be at most 128 bytes",
1490
		}
1491
		if !all {
1492
			return err
1493
		}
1494
		errors = append(errors, err)
1495
	}
1496
1497
	if !_PermissionLookupEntityRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
1498
		err := PermissionLookupEntityRequestValidationError{
1499
			field:  "TenantId",
1500
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
1501
		}
1502
		if !all {
1503
			return err
1504
		}
1505
		errors = append(errors, err)
1506
	}
1507
1508
	if m.GetMetadata() == nil {
1509
		err := PermissionLookupEntityRequestValidationError{
1510
			field:  "Metadata",
1511
			reason: "value is required",
1512
		}
1513
		if !all {
1514
			return err
1515
		}
1516
		errors = append(errors, err)
1517
	}
1518
1519
	if all {
1520
		switch v := interface{}(m.GetMetadata()).(type) {
1521
		case interface{ ValidateAll() error }:
1522
			if err := v.ValidateAll(); err != nil {
1523
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1524
					field:  "Metadata",
1525
					reason: "embedded message failed validation",
1526
					cause:  err,
1527
				})
1528
			}
1529
		case interface{ Validate() error }:
1530
			if err := v.Validate(); err != nil {
1531
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1532
					field:  "Metadata",
1533
					reason: "embedded message failed validation",
1534
					cause:  err,
1535
				})
1536
			}
1537
		}
1538
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
1539
		if err := v.Validate(); err != nil {
1540
			return PermissionLookupEntityRequestValidationError{
1541
				field:  "Metadata",
1542
				reason: "embedded message failed validation",
1543
				cause:  err,
1544
			}
1545
		}
1546
	}
1547
1548
	if len(m.GetEntityType()) > 64 {
1549
		err := PermissionLookupEntityRequestValidationError{
1550
			field:  "EntityType",
1551
			reason: "value length must be at most 64 bytes",
1552
		}
1553
		if !all {
1554
			return err
1555
		}
1556
		errors = append(errors, err)
1557
	}
1558
1559
	if !_PermissionLookupEntityRequest_EntityType_Pattern.MatchString(m.GetEntityType()) {
1560
		err := PermissionLookupEntityRequestValidationError{
1561
			field:  "EntityType",
1562
			reason: "value does not match regex pattern \"^[a-zA-Z_]{1,64}$\"",
1563
		}
1564
		if !all {
1565
			return err
1566
		}
1567
		errors = append(errors, err)
1568
	}
1569
1570
	if len(m.GetPermission()) > 64 {
1571
		err := PermissionLookupEntityRequestValidationError{
1572
			field:  "Permission",
1573
			reason: "value length must be at most 64 bytes",
1574
		}
1575
		if !all {
1576
			return err
1577
		}
1578
		errors = append(errors, err)
1579
	}
1580
1581
	if !_PermissionLookupEntityRequest_Permission_Pattern.MatchString(m.GetPermission()) {
1582
		err := PermissionLookupEntityRequestValidationError{
1583
			field:  "Permission",
1584
			reason: "value does not match regex pattern \"^[a-zA-Z_]{1,64}$\"",
1585
		}
1586
		if !all {
1587
			return err
1588
		}
1589
		errors = append(errors, err)
1590
	}
1591
1592
	if m.GetSubject() == nil {
1593
		err := PermissionLookupEntityRequestValidationError{
1594
			field:  "Subject",
1595
			reason: "value is required",
1596
		}
1597
		if !all {
1598
			return err
1599
		}
1600
		errors = append(errors, err)
1601
	}
1602
1603
	if all {
1604
		switch v := interface{}(m.GetSubject()).(type) {
1605
		case interface{ ValidateAll() error }:
1606
			if err := v.ValidateAll(); err != nil {
1607
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1608
					field:  "Subject",
1609
					reason: "embedded message failed validation",
1610
					cause:  err,
1611
				})
1612
			}
1613
		case interface{ Validate() error }:
1614
			if err := v.Validate(); err != nil {
1615
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1616
					field:  "Subject",
1617
					reason: "embedded message failed validation",
1618
					cause:  err,
1619
				})
1620
			}
1621
		}
1622
	} else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
1623
		if err := v.Validate(); err != nil {
1624
			return PermissionLookupEntityRequestValidationError{
1625
				field:  "Subject",
1626
				reason: "embedded message failed validation",
1627
				cause:  err,
1628
			}
1629
		}
1630
	}
1631
1632
	if all {
1633
		switch v := interface{}(m.GetContext()).(type) {
1634
		case interface{ ValidateAll() error }:
1635
			if err := v.ValidateAll(); err != nil {
1636
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1637
					field:  "Context",
1638
					reason: "embedded message failed validation",
1639
					cause:  err,
1640
				})
1641
			}
1642
		case interface{ Validate() error }:
1643
			if err := v.Validate(); err != nil {
1644
				errors = append(errors, PermissionLookupEntityRequestValidationError{
1645
					field:  "Context",
1646
					reason: "embedded message failed validation",
1647
					cause:  err,
1648
				})
1649
			}
1650
		}
1651
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
1652
		if err := v.Validate(); err != nil {
1653
			return PermissionLookupEntityRequestValidationError{
1654
				field:  "Context",
1655
				reason: "embedded message failed validation",
1656
				cause:  err,
1657
			}
1658
		}
1659
	}
1660
1661
	if len(errors) > 0 {
1662
		return PermissionLookupEntityRequestMultiError(errors)
1663
	}
1664
1665
	return nil
1666
}
1667
1668
// PermissionLookupEntityRequestMultiError is an error wrapping multiple
1669
// validation errors returned by PermissionLookupEntityRequest.ValidateAll()
1670
// if the designated constraints aren't met.
1671
type PermissionLookupEntityRequestMultiError []error
1672
1673
// Error returns a concatenation of all the error messages it wraps.
1674
func (m PermissionLookupEntityRequestMultiError) Error() string {
1675
	var msgs []string
1676
	for _, err := range m {
1677
		msgs = append(msgs, err.Error())
1678
	}
1679
	return strings.Join(msgs, "; ")
1680
}
1681
1682
// AllErrors returns a list of validation violation errors.
1683
func (m PermissionLookupEntityRequestMultiError) AllErrors() []error { return m }
1684
1685
// PermissionLookupEntityRequestValidationError is the validation error
1686
// returned by PermissionLookupEntityRequest.Validate if the designated
1687
// constraints aren't met.
1688
type PermissionLookupEntityRequestValidationError struct {
1689
	field  string
1690
	reason string
1691
	cause  error
1692
	key    bool
1693
}
1694
1695
// Field function returns field value.
1696
func (e PermissionLookupEntityRequestValidationError) Field() string { return e.field }
1697
1698
// Reason function returns reason value.
1699
func (e PermissionLookupEntityRequestValidationError) Reason() string { return e.reason }
1700
1701
// Cause function returns cause value.
1702
func (e PermissionLookupEntityRequestValidationError) Cause() error { return e.cause }
1703
1704
// Key function returns key value.
1705
func (e PermissionLookupEntityRequestValidationError) Key() bool { return e.key }
1706
1707
// ErrorName returns error name.
1708
func (e PermissionLookupEntityRequestValidationError) ErrorName() string {
1709
	return "PermissionLookupEntityRequestValidationError"
1710
}
1711
1712
// Error satisfies the builtin error interface
1713
func (e PermissionLookupEntityRequestValidationError) Error() string {
1714
	cause := ""
1715
	if e.cause != nil {
1716
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1717
	}
1718
1719
	key := ""
1720
	if e.key {
1721
		key = "key for "
1722
	}
1723
1724
	return fmt.Sprintf(
1725
		"invalid %sPermissionLookupEntityRequest.%s: %s%s",
1726
		key,
1727
		e.field,
1728
		e.reason,
1729
		cause)
1730
}
1731
1732
var _ error = PermissionLookupEntityRequestValidationError{}
1733
1734
var _ interface {
1735
	Field() string
1736
	Reason() string
1737
	Key() bool
1738
	Cause() error
1739
	ErrorName() string
1740
} = PermissionLookupEntityRequestValidationError{}
1741
1742
var _PermissionLookupEntityRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
1743
1744
var _PermissionLookupEntityRequest_EntityType_Pattern = regexp.MustCompile("^[a-zA-Z_]{1,64}$")
1745
1746
var _PermissionLookupEntityRequest_Permission_Pattern = regexp.MustCompile("^[a-zA-Z_]{1,64}$")
1747
1748
// Validate checks the field values on PermissionLookupEntityRequestMetadata
1749
// with the rules defined in the proto definition for this message. If any
1750
// rules are violated, the first error encountered is returned, or nil if
1751
// there are no violations.
1752
func (m *PermissionLookupEntityRequestMetadata) Validate() error {
1753
	return m.validate(false)
1754
}
1755
1756
// ValidateAll checks the field values on PermissionLookupEntityRequestMetadata
1757
// with the rules defined in the proto definition for this message. If any
1758
// rules are violated, the result is a list of violation errors wrapped in
1759
// PermissionLookupEntityRequestMetadataMultiError, or nil if none found.
1760
func (m *PermissionLookupEntityRequestMetadata) ValidateAll() error {
1761
	return m.validate(true)
1762
}
1763
1764
func (m *PermissionLookupEntityRequestMetadata) validate(all bool) error {
1765
	if m == nil {
1766
		return nil
1767
	}
1768
1769
	var errors []error
1770
1771
	// no validation rules for SchemaVersion
1772
1773
	// no validation rules for SnapToken
1774
1775
	if m.GetDepth() < 3 {
1776
		err := PermissionLookupEntityRequestMetadataValidationError{
1777
			field:  "Depth",
1778
			reason: "value must be greater than or equal to 3",
1779
		}
1780
		if !all {
1781
			return err
1782
		}
1783
		errors = append(errors, err)
1784
	}
1785
1786
	if len(errors) > 0 {
1787
		return PermissionLookupEntityRequestMetadataMultiError(errors)
1788
	}
1789
1790
	return nil
1791
}
1792
1793
// PermissionLookupEntityRequestMetadataMultiError is an error wrapping
1794
// multiple validation errors returned by
1795
// PermissionLookupEntityRequestMetadata.ValidateAll() if the designated
1796
// constraints aren't met.
1797
type PermissionLookupEntityRequestMetadataMultiError []error
1798
1799
// Error returns a concatenation of all the error messages it wraps.
1800
func (m PermissionLookupEntityRequestMetadataMultiError) Error() string {
1801
	var msgs []string
1802
	for _, err := range m {
1803
		msgs = append(msgs, err.Error())
1804
	}
1805
	return strings.Join(msgs, "; ")
1806
}
1807
1808
// AllErrors returns a list of validation violation errors.
1809
func (m PermissionLookupEntityRequestMetadataMultiError) AllErrors() []error { return m }
1810
1811
// PermissionLookupEntityRequestMetadataValidationError is the validation error
1812
// returned by PermissionLookupEntityRequestMetadata.Validate if the
1813
// designated constraints aren't met.
1814
type PermissionLookupEntityRequestMetadataValidationError struct {
1815
	field  string
1816
	reason string
1817
	cause  error
1818
	key    bool
1819
}
1820
1821
// Field function returns field value.
1822
func (e PermissionLookupEntityRequestMetadataValidationError) Field() string { return e.field }
1823
1824
// Reason function returns reason value.
1825
func (e PermissionLookupEntityRequestMetadataValidationError) Reason() string { return e.reason }
1826
1827
// Cause function returns cause value.
1828
func (e PermissionLookupEntityRequestMetadataValidationError) Cause() error { return e.cause }
1829
1830
// Key function returns key value.
1831
func (e PermissionLookupEntityRequestMetadataValidationError) Key() bool { return e.key }
1832
1833
// ErrorName returns error name.
1834
func (e PermissionLookupEntityRequestMetadataValidationError) ErrorName() string {
1835
	return "PermissionLookupEntityRequestMetadataValidationError"
1836
}
1837
1838
// Error satisfies the builtin error interface
1839
func (e PermissionLookupEntityRequestMetadataValidationError) Error() string {
1840
	cause := ""
1841
	if e.cause != nil {
1842
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1843
	}
1844
1845
	key := ""
1846
	if e.key {
1847
		key = "key for "
1848
	}
1849
1850
	return fmt.Sprintf(
1851
		"invalid %sPermissionLookupEntityRequestMetadata.%s: %s%s",
1852
		key,
1853
		e.field,
1854
		e.reason,
1855
		cause)
1856
}
1857
1858
var _ error = PermissionLookupEntityRequestMetadataValidationError{}
1859
1860
var _ interface {
1861
	Field() string
1862
	Reason() string
1863
	Key() bool
1864
	Cause() error
1865
	ErrorName() string
1866
} = PermissionLookupEntityRequestMetadataValidationError{}
1867
1868
// Validate checks the field values on PermissionLookupEntityResponse with the
1869
// rules defined in the proto definition for this message. If any rules are
1870
// violated, the first error encountered is returned, or nil if there are no violations.
1871
func (m *PermissionLookupEntityResponse) Validate() error {
1872
	return m.validate(false)
1873
}
1874
1875
// ValidateAll checks the field values on PermissionLookupEntityResponse with
1876
// the rules defined in the proto definition for this message. If any rules
1877
// are violated, the result is a list of violation errors wrapped in
1878
// PermissionLookupEntityResponseMultiError, or nil if none found.
1879
func (m *PermissionLookupEntityResponse) ValidateAll() error {
1880
	return m.validate(true)
1881
}
1882
1883
func (m *PermissionLookupEntityResponse) validate(all bool) error {
1884
	if m == nil {
1885
		return nil
1886
	}
1887
1888
	var errors []error
1889
1890
	if len(errors) > 0 {
1891
		return PermissionLookupEntityResponseMultiError(errors)
1892
	}
1893
1894
	return nil
1895
}
1896
1897
// PermissionLookupEntityResponseMultiError is an error wrapping multiple
1898
// validation errors returned by PermissionLookupEntityResponse.ValidateAll()
1899
// if the designated constraints aren't met.
1900
type PermissionLookupEntityResponseMultiError []error
1901
1902
// Error returns a concatenation of all the error messages it wraps.
1903
func (m PermissionLookupEntityResponseMultiError) Error() string {
1904
	var msgs []string
1905
	for _, err := range m {
1906
		msgs = append(msgs, err.Error())
1907
	}
1908
	return strings.Join(msgs, "; ")
1909
}
1910
1911
// AllErrors returns a list of validation violation errors.
1912
func (m PermissionLookupEntityResponseMultiError) AllErrors() []error { return m }
1913
1914
// PermissionLookupEntityResponseValidationError is the validation error
1915
// returned by PermissionLookupEntityResponse.Validate if the designated
1916
// constraints aren't met.
1917
type PermissionLookupEntityResponseValidationError struct {
1918
	field  string
1919
	reason string
1920
	cause  error
1921
	key    bool
1922
}
1923
1924
// Field function returns field value.
1925
func (e PermissionLookupEntityResponseValidationError) Field() string { return e.field }
1926
1927
// Reason function returns reason value.
1928
func (e PermissionLookupEntityResponseValidationError) Reason() string { return e.reason }
1929
1930
// Cause function returns cause value.
1931
func (e PermissionLookupEntityResponseValidationError) Cause() error { return e.cause }
1932
1933
// Key function returns key value.
1934
func (e PermissionLookupEntityResponseValidationError) Key() bool { return e.key }
1935
1936
// ErrorName returns error name.
1937
func (e PermissionLookupEntityResponseValidationError) ErrorName() string {
1938
	return "PermissionLookupEntityResponseValidationError"
1939
}
1940
1941
// Error satisfies the builtin error interface
1942
func (e PermissionLookupEntityResponseValidationError) Error() string {
1943
	cause := ""
1944
	if e.cause != nil {
1945
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
1946
	}
1947
1948
	key := ""
1949
	if e.key {
1950
		key = "key for "
1951
	}
1952
1953
	return fmt.Sprintf(
1954
		"invalid %sPermissionLookupEntityResponse.%s: %s%s",
1955
		key,
1956
		e.field,
1957
		e.reason,
1958
		cause)
1959
}
1960
1961
var _ error = PermissionLookupEntityResponseValidationError{}
1962
1963
var _ interface {
1964
	Field() string
1965
	Reason() string
1966
	Key() bool
1967
	Cause() error
1968
	ErrorName() string
1969
} = PermissionLookupEntityResponseValidationError{}
1970
1971
// Validate checks the field values on PermissionLookupEntityStreamResponse
1972
// with the rules defined in the proto definition for this message. If any
1973
// rules are violated, the first error encountered is returned, or nil if
1974
// there are no violations.
1975
func (m *PermissionLookupEntityStreamResponse) Validate() error {
1976
	return m.validate(false)
1977
}
1978
1979
// ValidateAll checks the field values on PermissionLookupEntityStreamResponse
1980
// with the rules defined in the proto definition for this message. If any
1981
// rules are violated, the result is a list of violation errors wrapped in
1982
// PermissionLookupEntityStreamResponseMultiError, or nil if none found.
1983
func (m *PermissionLookupEntityStreamResponse) ValidateAll() error {
1984
	return m.validate(true)
1985
}
1986
1987
func (m *PermissionLookupEntityStreamResponse) validate(all bool) error {
1988
	if m == nil {
1989
		return nil
1990
	}
1991
1992
	var errors []error
1993
1994
	// no validation rules for EntityId
1995
1996
	if len(errors) > 0 {
1997
		return PermissionLookupEntityStreamResponseMultiError(errors)
1998
	}
1999
2000
	return nil
2001
}
2002
2003
// PermissionLookupEntityStreamResponseMultiError is an error wrapping multiple
2004
// validation errors returned by
2005
// PermissionLookupEntityStreamResponse.ValidateAll() if the designated
2006
// constraints aren't met.
2007
type PermissionLookupEntityStreamResponseMultiError []error
2008
2009
// Error returns a concatenation of all the error messages it wraps.
2010
func (m PermissionLookupEntityStreamResponseMultiError) Error() string {
2011
	var msgs []string
2012
	for _, err := range m {
2013
		msgs = append(msgs, err.Error())
2014
	}
2015
	return strings.Join(msgs, "; ")
2016
}
2017
2018
// AllErrors returns a list of validation violation errors.
2019
func (m PermissionLookupEntityStreamResponseMultiError) AllErrors() []error { return m }
2020
2021
// PermissionLookupEntityStreamResponseValidationError is the validation error
2022
// returned by PermissionLookupEntityStreamResponse.Validate if the designated
2023
// constraints aren't met.
2024
type PermissionLookupEntityStreamResponseValidationError struct {
2025
	field  string
2026
	reason string
2027
	cause  error
2028
	key    bool
2029
}
2030
2031
// Field function returns field value.
2032
func (e PermissionLookupEntityStreamResponseValidationError) Field() string { return e.field }
2033
2034
// Reason function returns reason value.
2035
func (e PermissionLookupEntityStreamResponseValidationError) Reason() string { return e.reason }
2036
2037
// Cause function returns cause value.
2038
func (e PermissionLookupEntityStreamResponseValidationError) Cause() error { return e.cause }
2039
2040
// Key function returns key value.
2041
func (e PermissionLookupEntityStreamResponseValidationError) Key() bool { return e.key }
2042
2043
// ErrorName returns error name.
2044
func (e PermissionLookupEntityStreamResponseValidationError) ErrorName() string {
2045
	return "PermissionLookupEntityStreamResponseValidationError"
2046
}
2047
2048
// Error satisfies the builtin error interface
2049
func (e PermissionLookupEntityStreamResponseValidationError) Error() string {
2050
	cause := ""
2051
	if e.cause != nil {
2052
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2053
	}
2054
2055
	key := ""
2056
	if e.key {
2057
		key = "key for "
2058
	}
2059
2060
	return fmt.Sprintf(
2061
		"invalid %sPermissionLookupEntityStreamResponse.%s: %s%s",
2062
		key,
2063
		e.field,
2064
		e.reason,
2065
		cause)
2066
}
2067
2068
var _ error = PermissionLookupEntityStreamResponseValidationError{}
2069
2070
var _ interface {
2071
	Field() string
2072
	Reason() string
2073
	Key() bool
2074
	Cause() error
2075
	ErrorName() string
2076
} = PermissionLookupEntityStreamResponseValidationError{}
2077
2078
// Validate checks the field values on PermissionEntityFilterRequest with the
2079
// rules defined in the proto definition for this message. If any rules are
2080
// violated, the first error encountered is returned, or nil if there are no violations.
2081
func (m *PermissionEntityFilterRequest) Validate() error {
2082
	return m.validate(false)
2083
}
2084
2085
// ValidateAll checks the field values on PermissionEntityFilterRequest with
2086
// the rules defined in the proto definition for this message. If any rules
2087
// are violated, the result is a list of violation errors wrapped in
2088
// PermissionEntityFilterRequestMultiError, or nil if none found.
2089
func (m *PermissionEntityFilterRequest) ValidateAll() error {
2090
	return m.validate(true)
2091
}
2092
2093
func (m *PermissionEntityFilterRequest) validate(all bool) error {
2094
	if m == nil {
2095
		return nil
2096
	}
2097
2098
	var errors []error
2099
2100
	if len(m.GetTenantId()) > 128 {
2101
		err := PermissionEntityFilterRequestValidationError{
2102
			field:  "TenantId",
2103
			reason: "value length must be at most 128 bytes",
2104
		}
2105
		if !all {
2106
			return err
2107
		}
2108
		errors = append(errors, err)
2109
	}
2110
2111
	if !_PermissionEntityFilterRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
2112
		err := PermissionEntityFilterRequestValidationError{
2113
			field:  "TenantId",
2114
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
2115
		}
2116
		if !all {
2117
			return err
2118
		}
2119
		errors = append(errors, err)
2120
	}
2121
2122
	if m.GetMetadata() == nil {
2123
		err := PermissionEntityFilterRequestValidationError{
2124
			field:  "Metadata",
2125
			reason: "value is required",
2126
		}
2127
		if !all {
2128
			return err
2129
		}
2130
		errors = append(errors, err)
2131
	}
2132
2133
	if all {
2134
		switch v := interface{}(m.GetMetadata()).(type) {
2135
		case interface{ ValidateAll() error }:
2136
			if err := v.ValidateAll(); err != nil {
2137
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2138
					field:  "Metadata",
2139
					reason: "embedded message failed validation",
2140
					cause:  err,
2141
				})
2142
			}
2143
		case interface{ Validate() error }:
2144
			if err := v.Validate(); err != nil {
2145
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2146
					field:  "Metadata",
2147
					reason: "embedded message failed validation",
2148
					cause:  err,
2149
				})
2150
			}
2151
		}
2152
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
2153
		if err := v.Validate(); err != nil {
2154
			return PermissionEntityFilterRequestValidationError{
2155
				field:  "Metadata",
2156
				reason: "embedded message failed validation",
2157
				cause:  err,
2158
			}
2159
		}
2160
	}
2161
2162
	if all {
2163
		switch v := interface{}(m.GetEntityReference()).(type) {
2164
		case interface{ ValidateAll() error }:
2165
			if err := v.ValidateAll(); err != nil {
2166
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2167
					field:  "EntityReference",
2168
					reason: "embedded message failed validation",
2169
					cause:  err,
2170
				})
2171
			}
2172
		case interface{ Validate() error }:
2173
			if err := v.Validate(); err != nil {
2174
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2175
					field:  "EntityReference",
2176
					reason: "embedded message failed validation",
2177
					cause:  err,
2178
				})
2179
			}
2180
		}
2181
	} else if v, ok := interface{}(m.GetEntityReference()).(interface{ Validate() error }); ok {
2182
		if err := v.Validate(); err != nil {
2183
			return PermissionEntityFilterRequestValidationError{
2184
				field:  "EntityReference",
2185
				reason: "embedded message failed validation",
2186
				cause:  err,
2187
			}
2188
		}
2189
	}
2190
2191
	if all {
2192
		switch v := interface{}(m.GetSubject()).(type) {
2193
		case interface{ ValidateAll() error }:
2194
			if err := v.ValidateAll(); err != nil {
2195
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2196
					field:  "Subject",
2197
					reason: "embedded message failed validation",
2198
					cause:  err,
2199
				})
2200
			}
2201
		case interface{ Validate() error }:
2202
			if err := v.Validate(); err != nil {
2203
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2204
					field:  "Subject",
2205
					reason: "embedded message failed validation",
2206
					cause:  err,
2207
				})
2208
			}
2209
		}
2210
	} else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
2211
		if err := v.Validate(); err != nil {
2212
			return PermissionEntityFilterRequestValidationError{
2213
				field:  "Subject",
2214
				reason: "embedded message failed validation",
2215
				cause:  err,
2216
			}
2217
		}
2218
	}
2219
2220
	if all {
2221
		switch v := interface{}(m.GetContext()).(type) {
2222
		case interface{ ValidateAll() error }:
2223
			if err := v.ValidateAll(); err != nil {
2224
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2225
					field:  "Context",
2226
					reason: "embedded message failed validation",
2227
					cause:  err,
2228
				})
2229
			}
2230
		case interface{ Validate() error }:
2231
			if err := v.Validate(); err != nil {
2232
				errors = append(errors, PermissionEntityFilterRequestValidationError{
2233
					field:  "Context",
2234
					reason: "embedded message failed validation",
2235
					cause:  err,
2236
				})
2237
			}
2238
		}
2239
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
2240
		if err := v.Validate(); err != nil {
2241
			return PermissionEntityFilterRequestValidationError{
2242
				field:  "Context",
2243
				reason: "embedded message failed validation",
2244
				cause:  err,
2245
			}
2246
		}
2247
	}
2248
2249
	if len(errors) > 0 {
2250
		return PermissionEntityFilterRequestMultiError(errors)
2251
	}
2252
2253
	return nil
2254
}
2255
2256
// PermissionEntityFilterRequestMultiError is an error wrapping multiple
2257
// validation errors returned by PermissionEntityFilterRequest.ValidateAll()
2258
// if the designated constraints aren't met.
2259
type PermissionEntityFilterRequestMultiError []error
2260
2261
// Error returns a concatenation of all the error messages it wraps.
2262
func (m PermissionEntityFilterRequestMultiError) Error() string {
2263
	var msgs []string
2264
	for _, err := range m {
2265
		msgs = append(msgs, err.Error())
2266
	}
2267
	return strings.Join(msgs, "; ")
2268
}
2269
2270
// AllErrors returns a list of validation violation errors.
2271
func (m PermissionEntityFilterRequestMultiError) AllErrors() []error { return m }
2272
2273
// PermissionEntityFilterRequestValidationError is the validation error
2274
// returned by PermissionEntityFilterRequest.Validate if the designated
2275
// constraints aren't met.
2276
type PermissionEntityFilterRequestValidationError struct {
2277
	field  string
2278
	reason string
2279
	cause  error
2280
	key    bool
2281
}
2282
2283
// Field function returns field value.
2284
func (e PermissionEntityFilterRequestValidationError) Field() string { return e.field }
2285
2286
// Reason function returns reason value.
2287
func (e PermissionEntityFilterRequestValidationError) Reason() string { return e.reason }
2288
2289
// Cause function returns cause value.
2290
func (e PermissionEntityFilterRequestValidationError) Cause() error { return e.cause }
2291
2292
// Key function returns key value.
2293
func (e PermissionEntityFilterRequestValidationError) Key() bool { return e.key }
2294
2295
// ErrorName returns error name.
2296
func (e PermissionEntityFilterRequestValidationError) ErrorName() string {
2297
	return "PermissionEntityFilterRequestValidationError"
2298
}
2299
2300
// Error satisfies the builtin error interface
2301
func (e PermissionEntityFilterRequestValidationError) Error() string {
2302
	cause := ""
2303
	if e.cause != nil {
2304
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2305
	}
2306
2307
	key := ""
2308
	if e.key {
2309
		key = "key for "
2310
	}
2311
2312
	return fmt.Sprintf(
2313
		"invalid %sPermissionEntityFilterRequest.%s: %s%s",
2314
		key,
2315
		e.field,
2316
		e.reason,
2317
		cause)
2318
}
2319
2320
var _ error = PermissionEntityFilterRequestValidationError{}
2321
2322
var _ interface {
2323
	Field() string
2324
	Reason() string
2325
	Key() bool
2326
	Cause() error
2327
	ErrorName() string
2328
} = PermissionEntityFilterRequestValidationError{}
2329
2330
var _PermissionEntityFilterRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
2331
2332
// Validate checks the field values on PermissionEntityFilterRequestMetadata
2333
// with the rules defined in the proto definition for this message. If any
2334
// rules are violated, the first error encountered is returned, or nil if
2335
// there are no violations.
2336
func (m *PermissionEntityFilterRequestMetadata) Validate() error {
2337
	return m.validate(false)
2338
}
2339
2340
// ValidateAll checks the field values on PermissionEntityFilterRequestMetadata
2341
// with the rules defined in the proto definition for this message. If any
2342
// rules are violated, the result is a list of violation errors wrapped in
2343
// PermissionEntityFilterRequestMetadataMultiError, or nil if none found.
2344
func (m *PermissionEntityFilterRequestMetadata) ValidateAll() error {
2345
	return m.validate(true)
2346
}
2347
2348
func (m *PermissionEntityFilterRequestMetadata) validate(all bool) error {
2349
	if m == nil {
2350
		return nil
2351
	}
2352
2353
	var errors []error
2354
2355
	// no validation rules for SchemaVersion
2356
2357
	// no validation rules for SnapToken
2358
2359
	if m.GetDepth() < 3 {
2360
		err := PermissionEntityFilterRequestMetadataValidationError{
2361
			field:  "Depth",
2362
			reason: "value must be greater than or equal to 3",
2363
		}
2364
		if !all {
2365
			return err
2366
		}
2367
		errors = append(errors, err)
2368
	}
2369
2370
	if len(errors) > 0 {
2371
		return PermissionEntityFilterRequestMetadataMultiError(errors)
2372
	}
2373
2374
	return nil
2375
}
2376
2377
// PermissionEntityFilterRequestMetadataMultiError is an error wrapping
2378
// multiple validation errors returned by
2379
// PermissionEntityFilterRequestMetadata.ValidateAll() if the designated
2380
// constraints aren't met.
2381
type PermissionEntityFilterRequestMetadataMultiError []error
2382
2383
// Error returns a concatenation of all the error messages it wraps.
2384
func (m PermissionEntityFilterRequestMetadataMultiError) Error() string {
2385
	var msgs []string
2386
	for _, err := range m {
2387
		msgs = append(msgs, err.Error())
2388
	}
2389
	return strings.Join(msgs, "; ")
2390
}
2391
2392
// AllErrors returns a list of validation violation errors.
2393
func (m PermissionEntityFilterRequestMetadataMultiError) AllErrors() []error { return m }
2394
2395
// PermissionEntityFilterRequestMetadataValidationError is the validation error
2396
// returned by PermissionEntityFilterRequestMetadata.Validate if the
2397
// designated constraints aren't met.
2398
type PermissionEntityFilterRequestMetadataValidationError struct {
2399
	field  string
2400
	reason string
2401
	cause  error
2402
	key    bool
2403
}
2404
2405
// Field function returns field value.
2406
func (e PermissionEntityFilterRequestMetadataValidationError) Field() string { return e.field }
2407
2408
// Reason function returns reason value.
2409
func (e PermissionEntityFilterRequestMetadataValidationError) Reason() string { return e.reason }
2410
2411
// Cause function returns cause value.
2412
func (e PermissionEntityFilterRequestMetadataValidationError) Cause() error { return e.cause }
2413
2414
// Key function returns key value.
2415
func (e PermissionEntityFilterRequestMetadataValidationError) Key() bool { return e.key }
2416
2417
// ErrorName returns error name.
2418
func (e PermissionEntityFilterRequestMetadataValidationError) ErrorName() string {
2419
	return "PermissionEntityFilterRequestMetadataValidationError"
2420
}
2421
2422
// Error satisfies the builtin error interface
2423
func (e PermissionEntityFilterRequestMetadataValidationError) Error() string {
2424
	cause := ""
2425
	if e.cause != nil {
2426
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2427
	}
2428
2429
	key := ""
2430
	if e.key {
2431
		key = "key for "
2432
	}
2433
2434
	return fmt.Sprintf(
2435
		"invalid %sPermissionEntityFilterRequestMetadata.%s: %s%s",
2436
		key,
2437
		e.field,
2438
		e.reason,
2439
		cause)
2440
}
2441
2442
var _ error = PermissionEntityFilterRequestMetadataValidationError{}
2443
2444
var _ interface {
2445
	Field() string
2446
	Reason() string
2447
	Key() bool
2448
	Cause() error
2449
	ErrorName() string
2450
} = PermissionEntityFilterRequestMetadataValidationError{}
2451
2452
// Validate checks the field values on PermissionLookupSubjectRequest with the
2453
// rules defined in the proto definition for this message. If any rules are
2454
// violated, the first error encountered is returned, or nil if there are no violations.
2455
func (m *PermissionLookupSubjectRequest) Validate() error {
2456
	return m.validate(false)
2457
}
2458
2459
// ValidateAll checks the field values on PermissionLookupSubjectRequest with
2460
// the rules defined in the proto definition for this message. If any rules
2461
// are violated, the result is a list of violation errors wrapped in
2462
// PermissionLookupSubjectRequestMultiError, or nil if none found.
2463
func (m *PermissionLookupSubjectRequest) ValidateAll() error {
2464
	return m.validate(true)
2465
}
2466
2467
func (m *PermissionLookupSubjectRequest) validate(all bool) error {
2468
	if m == nil {
2469
		return nil
2470
	}
2471
2472
	var errors []error
2473
2474
	if len(m.GetTenantId()) > 128 {
2475
		err := PermissionLookupSubjectRequestValidationError{
2476
			field:  "TenantId",
2477
			reason: "value length must be at most 128 bytes",
2478
		}
2479
		if !all {
2480
			return err
2481
		}
2482
		errors = append(errors, err)
2483
	}
2484
2485
	if !_PermissionLookupSubjectRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
2486
		err := PermissionLookupSubjectRequestValidationError{
2487
			field:  "TenantId",
2488
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
2489
		}
2490
		if !all {
2491
			return err
2492
		}
2493
		errors = append(errors, err)
2494
	}
2495
2496
	if m.GetMetadata() == nil {
2497
		err := PermissionLookupSubjectRequestValidationError{
2498
			field:  "Metadata",
2499
			reason: "value is required",
2500
		}
2501
		if !all {
2502
			return err
2503
		}
2504
		errors = append(errors, err)
2505
	}
2506
2507
	if all {
2508
		switch v := interface{}(m.GetMetadata()).(type) {
2509
		case interface{ ValidateAll() error }:
2510
			if err := v.ValidateAll(); err != nil {
2511
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2512
					field:  "Metadata",
2513
					reason: "embedded message failed validation",
2514
					cause:  err,
2515
				})
2516
			}
2517
		case interface{ Validate() error }:
2518
			if err := v.Validate(); err != nil {
2519
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2520
					field:  "Metadata",
2521
					reason: "embedded message failed validation",
2522
					cause:  err,
2523
				})
2524
			}
2525
		}
2526
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
2527
		if err := v.Validate(); err != nil {
2528
			return PermissionLookupSubjectRequestValidationError{
2529
				field:  "Metadata",
2530
				reason: "embedded message failed validation",
2531
				cause:  err,
2532
			}
2533
		}
2534
	}
2535
2536
	if m.GetEntity() == nil {
2537
		err := PermissionLookupSubjectRequestValidationError{
2538
			field:  "Entity",
2539
			reason: "value is required",
2540
		}
2541
		if !all {
2542
			return err
2543
		}
2544
		errors = append(errors, err)
2545
	}
2546
2547
	if all {
2548
		switch v := interface{}(m.GetEntity()).(type) {
2549
		case interface{ ValidateAll() error }:
2550
			if err := v.ValidateAll(); err != nil {
2551
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2552
					field:  "Entity",
2553
					reason: "embedded message failed validation",
2554
					cause:  err,
2555
				})
2556
			}
2557
		case interface{ Validate() error }:
2558
			if err := v.Validate(); err != nil {
2559
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2560
					field:  "Entity",
2561
					reason: "embedded message failed validation",
2562
					cause:  err,
2563
				})
2564
			}
2565
		}
2566
	} else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
2567
		if err := v.Validate(); err != nil {
2568
			return PermissionLookupSubjectRequestValidationError{
2569
				field:  "Entity",
2570
				reason: "embedded message failed validation",
2571
				cause:  err,
2572
			}
2573
		}
2574
	}
2575
2576
	if len(m.GetPermission()) > 64 {
2577
		err := PermissionLookupSubjectRequestValidationError{
2578
			field:  "Permission",
2579
			reason: "value length must be at most 64 bytes",
2580
		}
2581
		if !all {
2582
			return err
2583
		}
2584
		errors = append(errors, err)
2585
	}
2586
2587
	if !_PermissionLookupSubjectRequest_Permission_Pattern.MatchString(m.GetPermission()) {
2588
		err := PermissionLookupSubjectRequestValidationError{
2589
			field:  "Permission",
2590
			reason: "value does not match regex pattern \"^[a-zA-Z_]{1,64}$\"",
2591
		}
2592
		if !all {
2593
			return err
2594
		}
2595
		errors = append(errors, err)
2596
	}
2597
2598
	if m.GetSubjectReference() == nil {
2599
		err := PermissionLookupSubjectRequestValidationError{
2600
			field:  "SubjectReference",
2601
			reason: "value is required",
2602
		}
2603
		if !all {
2604
			return err
2605
		}
2606
		errors = append(errors, err)
2607
	}
2608
2609
	if all {
2610
		switch v := interface{}(m.GetSubjectReference()).(type) {
2611
		case interface{ ValidateAll() error }:
2612
			if err := v.ValidateAll(); err != nil {
2613
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2614
					field:  "SubjectReference",
2615
					reason: "embedded message failed validation",
2616
					cause:  err,
2617
				})
2618
			}
2619
		case interface{ Validate() error }:
2620
			if err := v.Validate(); err != nil {
2621
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2622
					field:  "SubjectReference",
2623
					reason: "embedded message failed validation",
2624
					cause:  err,
2625
				})
2626
			}
2627
		}
2628
	} else if v, ok := interface{}(m.GetSubjectReference()).(interface{ Validate() error }); ok {
2629
		if err := v.Validate(); err != nil {
2630
			return PermissionLookupSubjectRequestValidationError{
2631
				field:  "SubjectReference",
2632
				reason: "embedded message failed validation",
2633
				cause:  err,
2634
			}
2635
		}
2636
	}
2637
2638
	if all {
2639
		switch v := interface{}(m.GetContext()).(type) {
2640
		case interface{ ValidateAll() error }:
2641
			if err := v.ValidateAll(); err != nil {
2642
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2643
					field:  "Context",
2644
					reason: "embedded message failed validation",
2645
					cause:  err,
2646
				})
2647
			}
2648
		case interface{ Validate() error }:
2649
			if err := v.Validate(); err != nil {
2650
				errors = append(errors, PermissionLookupSubjectRequestValidationError{
2651
					field:  "Context",
2652
					reason: "embedded message failed validation",
2653
					cause:  err,
2654
				})
2655
			}
2656
		}
2657
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
2658
		if err := v.Validate(); err != nil {
2659
			return PermissionLookupSubjectRequestValidationError{
2660
				field:  "Context",
2661
				reason: "embedded message failed validation",
2662
				cause:  err,
2663
			}
2664
		}
2665
	}
2666
2667
	if len(errors) > 0 {
2668
		return PermissionLookupSubjectRequestMultiError(errors)
2669
	}
2670
2671
	return nil
2672
}
2673
2674
// PermissionLookupSubjectRequestMultiError is an error wrapping multiple
2675
// validation errors returned by PermissionLookupSubjectRequest.ValidateAll()
2676
// if the designated constraints aren't met.
2677
type PermissionLookupSubjectRequestMultiError []error
2678
2679
// Error returns a concatenation of all the error messages it wraps.
2680
func (m PermissionLookupSubjectRequestMultiError) Error() string {
2681
	var msgs []string
2682
	for _, err := range m {
2683
		msgs = append(msgs, err.Error())
2684
	}
2685
	return strings.Join(msgs, "; ")
2686
}
2687
2688
// AllErrors returns a list of validation violation errors.
2689
func (m PermissionLookupSubjectRequestMultiError) AllErrors() []error { return m }
2690
2691
// PermissionLookupSubjectRequestValidationError is the validation error
2692
// returned by PermissionLookupSubjectRequest.Validate if the designated
2693
// constraints aren't met.
2694
type PermissionLookupSubjectRequestValidationError struct {
2695
	field  string
2696
	reason string
2697
	cause  error
2698
	key    bool
2699
}
2700
2701
// Field function returns field value.
2702
func (e PermissionLookupSubjectRequestValidationError) Field() string { return e.field }
2703
2704
// Reason function returns reason value.
2705
func (e PermissionLookupSubjectRequestValidationError) Reason() string { return e.reason }
2706
2707
// Cause function returns cause value.
2708
func (e PermissionLookupSubjectRequestValidationError) Cause() error { return e.cause }
2709
2710
// Key function returns key value.
2711
func (e PermissionLookupSubjectRequestValidationError) Key() bool { return e.key }
2712
2713
// ErrorName returns error name.
2714
func (e PermissionLookupSubjectRequestValidationError) ErrorName() string {
2715
	return "PermissionLookupSubjectRequestValidationError"
2716
}
2717
2718
// Error satisfies the builtin error interface
2719
func (e PermissionLookupSubjectRequestValidationError) Error() string {
2720
	cause := ""
2721
	if e.cause != nil {
2722
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2723
	}
2724
2725
	key := ""
2726
	if e.key {
2727
		key = "key for "
2728
	}
2729
2730
	return fmt.Sprintf(
2731
		"invalid %sPermissionLookupSubjectRequest.%s: %s%s",
2732
		key,
2733
		e.field,
2734
		e.reason,
2735
		cause)
2736
}
2737
2738
var _ error = PermissionLookupSubjectRequestValidationError{}
2739
2740
var _ interface {
2741
	Field() string
2742
	Reason() string
2743
	Key() bool
2744
	Cause() error
2745
	ErrorName() string
2746
} = PermissionLookupSubjectRequestValidationError{}
2747
2748
var _PermissionLookupSubjectRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
2749
2750
var _PermissionLookupSubjectRequest_Permission_Pattern = regexp.MustCompile("^[a-zA-Z_]{1,64}$")
2751
2752
// Validate checks the field values on PermissionLookupSubjectRequestMetadata
2753
// with the rules defined in the proto definition for this message. If any
2754
// rules are violated, the first error encountered is returned, or nil if
2755
// there are no violations.
2756
func (m *PermissionLookupSubjectRequestMetadata) Validate() error {
2757
	return m.validate(false)
2758
}
2759
2760
// ValidateAll checks the field values on
2761
// PermissionLookupSubjectRequestMetadata with the rules defined in the proto
2762
// definition for this message. If any rules are violated, the result is a
2763
// list of violation errors wrapped in
2764
// PermissionLookupSubjectRequestMetadataMultiError, or nil if none found.
2765
func (m *PermissionLookupSubjectRequestMetadata) ValidateAll() error {
2766
	return m.validate(true)
2767
}
2768
2769
func (m *PermissionLookupSubjectRequestMetadata) validate(all bool) error {
2770
	if m == nil {
2771
		return nil
2772
	}
2773
2774
	var errors []error
2775
2776
	// no validation rules for SchemaVersion
2777
2778
	// no validation rules for SnapToken
2779
2780
	if m.GetDepth() < 3 {
2781
		err := PermissionLookupSubjectRequestMetadataValidationError{
2782
			field:  "Depth",
2783
			reason: "value must be greater than or equal to 3",
2784
		}
2785
		if !all {
2786
			return err
2787
		}
2788
		errors = append(errors, err)
2789
	}
2790
2791
	if len(errors) > 0 {
2792
		return PermissionLookupSubjectRequestMetadataMultiError(errors)
2793
	}
2794
2795
	return nil
2796
}
2797
2798
// PermissionLookupSubjectRequestMetadataMultiError is an error wrapping
2799
// multiple validation errors returned by
2800
// PermissionLookupSubjectRequestMetadata.ValidateAll() if the designated
2801
// constraints aren't met.
2802
type PermissionLookupSubjectRequestMetadataMultiError []error
2803
2804
// Error returns a concatenation of all the error messages it wraps.
2805
func (m PermissionLookupSubjectRequestMetadataMultiError) Error() string {
2806
	var msgs []string
2807
	for _, err := range m {
2808
		msgs = append(msgs, err.Error())
2809
	}
2810
	return strings.Join(msgs, "; ")
2811
}
2812
2813
// AllErrors returns a list of validation violation errors.
2814
func (m PermissionLookupSubjectRequestMetadataMultiError) AllErrors() []error { return m }
2815
2816
// PermissionLookupSubjectRequestMetadataValidationError is the validation
2817
// error returned by PermissionLookupSubjectRequestMetadata.Validate if the
2818
// designated constraints aren't met.
2819
type PermissionLookupSubjectRequestMetadataValidationError struct {
2820
	field  string
2821
	reason string
2822
	cause  error
2823
	key    bool
2824
}
2825
2826
// Field function returns field value.
2827
func (e PermissionLookupSubjectRequestMetadataValidationError) Field() string { return e.field }
2828
2829
// Reason function returns reason value.
2830
func (e PermissionLookupSubjectRequestMetadataValidationError) Reason() string { return e.reason }
2831
2832
// Cause function returns cause value.
2833
func (e PermissionLookupSubjectRequestMetadataValidationError) Cause() error { return e.cause }
2834
2835
// Key function returns key value.
2836
func (e PermissionLookupSubjectRequestMetadataValidationError) Key() bool { return e.key }
2837
2838
// ErrorName returns error name.
2839
func (e PermissionLookupSubjectRequestMetadataValidationError) ErrorName() string {
2840
	return "PermissionLookupSubjectRequestMetadataValidationError"
2841
}
2842
2843
// Error satisfies the builtin error interface
2844
func (e PermissionLookupSubjectRequestMetadataValidationError) Error() string {
2845
	cause := ""
2846
	if e.cause != nil {
2847
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2848
	}
2849
2850
	key := ""
2851
	if e.key {
2852
		key = "key for "
2853
	}
2854
2855
	return fmt.Sprintf(
2856
		"invalid %sPermissionLookupSubjectRequestMetadata.%s: %s%s",
2857
		key,
2858
		e.field,
2859
		e.reason,
2860
		cause)
2861
}
2862
2863
var _ error = PermissionLookupSubjectRequestMetadataValidationError{}
2864
2865
var _ interface {
2866
	Field() string
2867
	Reason() string
2868
	Key() bool
2869
	Cause() error
2870
	ErrorName() string
2871
} = PermissionLookupSubjectRequestMetadataValidationError{}
2872
2873
// Validate checks the field values on PermissionLookupSubjectResponse with the
2874
// rules defined in the proto definition for this message. If any rules are
2875
// violated, the first error encountered is returned, or nil if there are no violations.
2876
func (m *PermissionLookupSubjectResponse) Validate() error {
2877
	return m.validate(false)
2878
}
2879
2880
// ValidateAll checks the field values on PermissionLookupSubjectResponse with
2881
// the rules defined in the proto definition for this message. If any rules
2882
// are violated, the result is a list of violation errors wrapped in
2883
// PermissionLookupSubjectResponseMultiError, or nil if none found.
2884
func (m *PermissionLookupSubjectResponse) ValidateAll() error {
2885
	return m.validate(true)
2886
}
2887
2888
func (m *PermissionLookupSubjectResponse) validate(all bool) error {
2889
	if m == nil {
2890
		return nil
2891
	}
2892
2893
	var errors []error
2894
2895
	if len(errors) > 0 {
2896
		return PermissionLookupSubjectResponseMultiError(errors)
2897
	}
2898
2899
	return nil
2900
}
2901
2902
// PermissionLookupSubjectResponseMultiError is an error wrapping multiple
2903
// validation errors returned by PermissionLookupSubjectResponse.ValidateAll()
2904
// if the designated constraints aren't met.
2905
type PermissionLookupSubjectResponseMultiError []error
2906
2907
// Error returns a concatenation of all the error messages it wraps.
2908
func (m PermissionLookupSubjectResponseMultiError) Error() string {
2909
	var msgs []string
2910
	for _, err := range m {
2911
		msgs = append(msgs, err.Error())
2912
	}
2913
	return strings.Join(msgs, "; ")
2914
}
2915
2916
// AllErrors returns a list of validation violation errors.
2917
func (m PermissionLookupSubjectResponseMultiError) AllErrors() []error { return m }
2918
2919
// PermissionLookupSubjectResponseValidationError is the validation error
2920
// returned by PermissionLookupSubjectResponse.Validate if the designated
2921
// constraints aren't met.
2922
type PermissionLookupSubjectResponseValidationError struct {
2923
	field  string
2924
	reason string
2925
	cause  error
2926
	key    bool
2927
}
2928
2929
// Field function returns field value.
2930
func (e PermissionLookupSubjectResponseValidationError) Field() string { return e.field }
2931
2932
// Reason function returns reason value.
2933
func (e PermissionLookupSubjectResponseValidationError) Reason() string { return e.reason }
2934
2935
// Cause function returns cause value.
2936
func (e PermissionLookupSubjectResponseValidationError) Cause() error { return e.cause }
2937
2938
// Key function returns key value.
2939
func (e PermissionLookupSubjectResponseValidationError) Key() bool { return e.key }
2940
2941
// ErrorName returns error name.
2942
func (e PermissionLookupSubjectResponseValidationError) ErrorName() string {
2943
	return "PermissionLookupSubjectResponseValidationError"
2944
}
2945
2946
// Error satisfies the builtin error interface
2947
func (e PermissionLookupSubjectResponseValidationError) Error() string {
2948
	cause := ""
2949
	if e.cause != nil {
2950
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
2951
	}
2952
2953
	key := ""
2954
	if e.key {
2955
		key = "key for "
2956
	}
2957
2958
	return fmt.Sprintf(
2959
		"invalid %sPermissionLookupSubjectResponse.%s: %s%s",
2960
		key,
2961
		e.field,
2962
		e.reason,
2963
		cause)
2964
}
2965
2966
var _ error = PermissionLookupSubjectResponseValidationError{}
2967
2968
var _ interface {
2969
	Field() string
2970
	Reason() string
2971
	Key() bool
2972
	Cause() error
2973
	ErrorName() string
2974
} = PermissionLookupSubjectResponseValidationError{}
2975
2976
// Validate checks the field values on PermissionSubjectPermissionRequest with
2977
// the rules defined in the proto definition for this message. If any rules
2978
// are violated, the first error encountered is returned, or nil if there are
2979
// no violations.
2980
func (m *PermissionSubjectPermissionRequest) Validate() error {
2981
	return m.validate(false)
2982
}
2983
2984
// ValidateAll checks the field values on PermissionSubjectPermissionRequest
2985
// with the rules defined in the proto definition for this message. If any
2986
// rules are violated, the result is a list of violation errors wrapped in
2987
// PermissionSubjectPermissionRequestMultiError, or nil if none found.
2988
func (m *PermissionSubjectPermissionRequest) ValidateAll() error {
2989
	return m.validate(true)
2990
}
2991
2992
func (m *PermissionSubjectPermissionRequest) validate(all bool) error {
2993
	if m == nil {
2994
		return nil
2995
	}
2996
2997
	var errors []error
2998
2999
	if len(m.GetTenantId()) > 128 {
3000
		err := PermissionSubjectPermissionRequestValidationError{
3001
			field:  "TenantId",
3002
			reason: "value length must be at most 128 bytes",
3003
		}
3004
		if !all {
3005
			return err
3006
		}
3007
		errors = append(errors, err)
3008
	}
3009
3010
	if !_PermissionSubjectPermissionRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
3011
		err := PermissionSubjectPermissionRequestValidationError{
3012
			field:  "TenantId",
3013
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
3014
		}
3015
		if !all {
3016
			return err
3017
		}
3018
		errors = append(errors, err)
3019
	}
3020
3021
	if m.GetMetadata() == nil {
3022
		err := PermissionSubjectPermissionRequestValidationError{
3023
			field:  "Metadata",
3024
			reason: "value is required",
3025
		}
3026
		if !all {
3027
			return err
3028
		}
3029
		errors = append(errors, err)
3030
	}
3031
3032
	if all {
3033
		switch v := interface{}(m.GetMetadata()).(type) {
3034
		case interface{ ValidateAll() error }:
3035
			if err := v.ValidateAll(); err != nil {
3036
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3037
					field:  "Metadata",
3038
					reason: "embedded message failed validation",
3039
					cause:  err,
3040
				})
3041
			}
3042
		case interface{ Validate() error }:
3043
			if err := v.Validate(); err != nil {
3044
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3045
					field:  "Metadata",
3046
					reason: "embedded message failed validation",
3047
					cause:  err,
3048
				})
3049
			}
3050
		}
3051
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
3052
		if err := v.Validate(); err != nil {
3053
			return PermissionSubjectPermissionRequestValidationError{
3054
				field:  "Metadata",
3055
				reason: "embedded message failed validation",
3056
				cause:  err,
3057
			}
3058
		}
3059
	}
3060
3061
	if m.GetEntity() == nil {
3062
		err := PermissionSubjectPermissionRequestValidationError{
3063
			field:  "Entity",
3064
			reason: "value is required",
3065
		}
3066
		if !all {
3067
			return err
3068
		}
3069
		errors = append(errors, err)
3070
	}
3071
3072
	if all {
3073
		switch v := interface{}(m.GetEntity()).(type) {
3074
		case interface{ ValidateAll() error }:
3075
			if err := v.ValidateAll(); err != nil {
3076
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3077
					field:  "Entity",
3078
					reason: "embedded message failed validation",
3079
					cause:  err,
3080
				})
3081
			}
3082
		case interface{ Validate() error }:
3083
			if err := v.Validate(); err != nil {
3084
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3085
					field:  "Entity",
3086
					reason: "embedded message failed validation",
3087
					cause:  err,
3088
				})
3089
			}
3090
		}
3091
	} else if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok {
3092
		if err := v.Validate(); err != nil {
3093
			return PermissionSubjectPermissionRequestValidationError{
3094
				field:  "Entity",
3095
				reason: "embedded message failed validation",
3096
				cause:  err,
3097
			}
3098
		}
3099
	}
3100
3101
	if m.GetSubject() == nil {
3102
		err := PermissionSubjectPermissionRequestValidationError{
3103
			field:  "Subject",
3104
			reason: "value is required",
3105
		}
3106
		if !all {
3107
			return err
3108
		}
3109
		errors = append(errors, err)
3110
	}
3111
3112
	if all {
3113
		switch v := interface{}(m.GetSubject()).(type) {
3114
		case interface{ ValidateAll() error }:
3115
			if err := v.ValidateAll(); err != nil {
3116
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3117
					field:  "Subject",
3118
					reason: "embedded message failed validation",
3119
					cause:  err,
3120
				})
3121
			}
3122
		case interface{ Validate() error }:
3123
			if err := v.Validate(); err != nil {
3124
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3125
					field:  "Subject",
3126
					reason: "embedded message failed validation",
3127
					cause:  err,
3128
				})
3129
			}
3130
		}
3131
	} else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
3132
		if err := v.Validate(); err != nil {
3133
			return PermissionSubjectPermissionRequestValidationError{
3134
				field:  "Subject",
3135
				reason: "embedded message failed validation",
3136
				cause:  err,
3137
			}
3138
		}
3139
	}
3140
3141
	if all {
3142
		switch v := interface{}(m.GetContext()).(type) {
3143
		case interface{ ValidateAll() error }:
3144
			if err := v.ValidateAll(); err != nil {
3145
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3146
					field:  "Context",
3147
					reason: "embedded message failed validation",
3148
					cause:  err,
3149
				})
3150
			}
3151
		case interface{ Validate() error }:
3152
			if err := v.Validate(); err != nil {
3153
				errors = append(errors, PermissionSubjectPermissionRequestValidationError{
3154
					field:  "Context",
3155
					reason: "embedded message failed validation",
3156
					cause:  err,
3157
				})
3158
			}
3159
		}
3160
	} else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
3161
		if err := v.Validate(); err != nil {
3162
			return PermissionSubjectPermissionRequestValidationError{
3163
				field:  "Context",
3164
				reason: "embedded message failed validation",
3165
				cause:  err,
3166
			}
3167
		}
3168
	}
3169
3170
	if len(errors) > 0 {
3171
		return PermissionSubjectPermissionRequestMultiError(errors)
3172
	}
3173
3174
	return nil
3175
}
3176
3177
// PermissionSubjectPermissionRequestMultiError is an error wrapping multiple
3178
// validation errors returned by
3179
// PermissionSubjectPermissionRequest.ValidateAll() if the designated
3180
// constraints aren't met.
3181
type PermissionSubjectPermissionRequestMultiError []error
3182
3183
// Error returns a concatenation of all the error messages it wraps.
3184
func (m PermissionSubjectPermissionRequestMultiError) Error() string {
3185
	var msgs []string
3186
	for _, err := range m {
3187
		msgs = append(msgs, err.Error())
3188
	}
3189
	return strings.Join(msgs, "; ")
3190
}
3191
3192
// AllErrors returns a list of validation violation errors.
3193
func (m PermissionSubjectPermissionRequestMultiError) AllErrors() []error { return m }
3194
3195
// PermissionSubjectPermissionRequestValidationError is the validation error
3196
// returned by PermissionSubjectPermissionRequest.Validate if the designated
3197
// constraints aren't met.
3198
type PermissionSubjectPermissionRequestValidationError struct {
3199
	field  string
3200
	reason string
3201
	cause  error
3202
	key    bool
3203
}
3204
3205
// Field function returns field value.
3206
func (e PermissionSubjectPermissionRequestValidationError) Field() string { return e.field }
3207
3208
// Reason function returns reason value.
3209
func (e PermissionSubjectPermissionRequestValidationError) Reason() string { return e.reason }
3210
3211
// Cause function returns cause value.
3212
func (e PermissionSubjectPermissionRequestValidationError) Cause() error { return e.cause }
3213
3214
// Key function returns key value.
3215
func (e PermissionSubjectPermissionRequestValidationError) Key() bool { return e.key }
3216
3217
// ErrorName returns error name.
3218
func (e PermissionSubjectPermissionRequestValidationError) ErrorName() string {
3219
	return "PermissionSubjectPermissionRequestValidationError"
3220
}
3221
3222
// Error satisfies the builtin error interface
3223
func (e PermissionSubjectPermissionRequestValidationError) Error() string {
3224
	cause := ""
3225
	if e.cause != nil {
3226
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3227
	}
3228
3229
	key := ""
3230
	if e.key {
3231
		key = "key for "
3232
	}
3233
3234
	return fmt.Sprintf(
3235
		"invalid %sPermissionSubjectPermissionRequest.%s: %s%s",
3236
		key,
3237
		e.field,
3238
		e.reason,
3239
		cause)
3240
}
3241
3242
var _ error = PermissionSubjectPermissionRequestValidationError{}
3243
3244
var _ interface {
3245
	Field() string
3246
	Reason() string
3247
	Key() bool
3248
	Cause() error
3249
	ErrorName() string
3250
} = PermissionSubjectPermissionRequestValidationError{}
3251
3252
var _PermissionSubjectPermissionRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
3253
3254
// Validate checks the field values on
3255
// PermissionSubjectPermissionRequestMetadata with the rules defined in the
3256
// proto definition for this message. If any rules are violated, the first
3257
// error encountered is returned, or nil if there are no violations.
3258
func (m *PermissionSubjectPermissionRequestMetadata) Validate() error {
3259
	return m.validate(false)
3260
}
3261
3262
// ValidateAll checks the field values on
3263
// PermissionSubjectPermissionRequestMetadata with the rules defined in the
3264
// proto definition for this message. If any rules are violated, the result is
3265
// a list of violation errors wrapped in
3266
// PermissionSubjectPermissionRequestMetadataMultiError, or nil if none found.
3267
func (m *PermissionSubjectPermissionRequestMetadata) ValidateAll() error {
3268
	return m.validate(true)
3269
}
3270
3271
func (m *PermissionSubjectPermissionRequestMetadata) validate(all bool) error {
3272
	if m == nil {
3273
		return nil
3274
	}
3275
3276
	var errors []error
3277
3278
	// no validation rules for SchemaVersion
3279
3280
	// no validation rules for SnapToken
3281
3282
	// no validation rules for OnlyPermission
3283
3284
	if m.GetDepth() < 3 {
3285
		err := PermissionSubjectPermissionRequestMetadataValidationError{
3286
			field:  "Depth",
3287
			reason: "value must be greater than or equal to 3",
3288
		}
3289
		if !all {
3290
			return err
3291
		}
3292
		errors = append(errors, err)
3293
	}
3294
3295
	if len(errors) > 0 {
3296
		return PermissionSubjectPermissionRequestMetadataMultiError(errors)
3297
	}
3298
3299
	return nil
3300
}
3301
3302
// PermissionSubjectPermissionRequestMetadataMultiError is an error wrapping
3303
// multiple validation errors returned by
3304
// PermissionSubjectPermissionRequestMetadata.ValidateAll() if the designated
3305
// constraints aren't met.
3306
type PermissionSubjectPermissionRequestMetadataMultiError []error
3307
3308
// Error returns a concatenation of all the error messages it wraps.
3309
func (m PermissionSubjectPermissionRequestMetadataMultiError) Error() string {
3310
	var msgs []string
3311
	for _, err := range m {
3312
		msgs = append(msgs, err.Error())
3313
	}
3314
	return strings.Join(msgs, "; ")
3315
}
3316
3317
// AllErrors returns a list of validation violation errors.
3318
func (m PermissionSubjectPermissionRequestMetadataMultiError) AllErrors() []error { return m }
3319
3320
// PermissionSubjectPermissionRequestMetadataValidationError is the validation
3321
// error returned by PermissionSubjectPermissionRequestMetadata.Validate if
3322
// the designated constraints aren't met.
3323
type PermissionSubjectPermissionRequestMetadataValidationError struct {
3324
	field  string
3325
	reason string
3326
	cause  error
3327
	key    bool
3328
}
3329
3330
// Field function returns field value.
3331
func (e PermissionSubjectPermissionRequestMetadataValidationError) Field() string { return e.field }
3332
3333
// Reason function returns reason value.
3334
func (e PermissionSubjectPermissionRequestMetadataValidationError) Reason() string { return e.reason }
3335
3336
// Cause function returns cause value.
3337
func (e PermissionSubjectPermissionRequestMetadataValidationError) Cause() error { return e.cause }
3338
3339
// Key function returns key value.
3340
func (e PermissionSubjectPermissionRequestMetadataValidationError) Key() bool { return e.key }
3341
3342
// ErrorName returns error name.
3343
func (e PermissionSubjectPermissionRequestMetadataValidationError) ErrorName() string {
3344
	return "PermissionSubjectPermissionRequestMetadataValidationError"
3345
}
3346
3347
// Error satisfies the builtin error interface
3348
func (e PermissionSubjectPermissionRequestMetadataValidationError) Error() string {
3349
	cause := ""
3350
	if e.cause != nil {
3351
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3352
	}
3353
3354
	key := ""
3355
	if e.key {
3356
		key = "key for "
3357
	}
3358
3359
	return fmt.Sprintf(
3360
		"invalid %sPermissionSubjectPermissionRequestMetadata.%s: %s%s",
3361
		key,
3362
		e.field,
3363
		e.reason,
3364
		cause)
3365
}
3366
3367
var _ error = PermissionSubjectPermissionRequestMetadataValidationError{}
3368
3369
var _ interface {
3370
	Field() string
3371
	Reason() string
3372
	Key() bool
3373
	Cause() error
3374
	ErrorName() string
3375
} = PermissionSubjectPermissionRequestMetadataValidationError{}
3376
3377
// Validate checks the field values on PermissionSubjectPermissionResponse with
3378
// the rules defined in the proto definition for this message. If any rules
3379
// are violated, the first error encountered is returned, or nil if there are
3380
// no violations.
3381
func (m *PermissionSubjectPermissionResponse) Validate() error {
3382
	return m.validate(false)
3383
}
3384
3385
// ValidateAll checks the field values on PermissionSubjectPermissionResponse
3386
// with the rules defined in the proto definition for this message. If any
3387
// rules are violated, the result is a list of violation errors wrapped in
3388
// PermissionSubjectPermissionResponseMultiError, or nil if none found.
3389
func (m *PermissionSubjectPermissionResponse) ValidateAll() error {
3390
	return m.validate(true)
3391
}
3392
3393
func (m *PermissionSubjectPermissionResponse) validate(all bool) error {
3394
	if m == nil {
3395
		return nil
3396
	}
3397
3398
	var errors []error
3399
3400
	// no validation rules for Results
3401
3402
	if len(errors) > 0 {
3403
		return PermissionSubjectPermissionResponseMultiError(errors)
3404
	}
3405
3406
	return nil
3407
}
3408
3409
// PermissionSubjectPermissionResponseMultiError is an error wrapping multiple
3410
// validation errors returned by
3411
// PermissionSubjectPermissionResponse.ValidateAll() if the designated
3412
// constraints aren't met.
3413
type PermissionSubjectPermissionResponseMultiError []error
3414
3415
// Error returns a concatenation of all the error messages it wraps.
3416
func (m PermissionSubjectPermissionResponseMultiError) Error() string {
3417
	var msgs []string
3418
	for _, err := range m {
3419
		msgs = append(msgs, err.Error())
3420
	}
3421
	return strings.Join(msgs, "; ")
3422
}
3423
3424
// AllErrors returns a list of validation violation errors.
3425
func (m PermissionSubjectPermissionResponseMultiError) AllErrors() []error { return m }
3426
3427
// PermissionSubjectPermissionResponseValidationError is the validation error
3428
// returned by PermissionSubjectPermissionResponse.Validate if the designated
3429
// constraints aren't met.
3430
type PermissionSubjectPermissionResponseValidationError struct {
3431
	field  string
3432
	reason string
3433
	cause  error
3434
	key    bool
3435
}
3436
3437
// Field function returns field value.
3438
func (e PermissionSubjectPermissionResponseValidationError) Field() string { return e.field }
3439
3440
// Reason function returns reason value.
3441
func (e PermissionSubjectPermissionResponseValidationError) Reason() string { return e.reason }
3442
3443
// Cause function returns cause value.
3444
func (e PermissionSubjectPermissionResponseValidationError) Cause() error { return e.cause }
3445
3446
// Key function returns key value.
3447
func (e PermissionSubjectPermissionResponseValidationError) Key() bool { return e.key }
3448
3449
// ErrorName returns error name.
3450
func (e PermissionSubjectPermissionResponseValidationError) ErrorName() string {
3451
	return "PermissionSubjectPermissionResponseValidationError"
3452
}
3453
3454
// Error satisfies the builtin error interface
3455
func (e PermissionSubjectPermissionResponseValidationError) Error() string {
3456
	cause := ""
3457
	if e.cause != nil {
3458
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3459
	}
3460
3461
	key := ""
3462
	if e.key {
3463
		key = "key for "
3464
	}
3465
3466
	return fmt.Sprintf(
3467
		"invalid %sPermissionSubjectPermissionResponse.%s: %s%s",
3468
		key,
3469
		e.field,
3470
		e.reason,
3471
		cause)
3472
}
3473
3474
var _ error = PermissionSubjectPermissionResponseValidationError{}
3475
3476
var _ interface {
3477
	Field() string
3478
	Reason() string
3479
	Key() bool
3480
	Cause() error
3481
	ErrorName() string
3482
} = PermissionSubjectPermissionResponseValidationError{}
3483
3484
// Validate checks the field values on WatchRequest with the rules defined in
3485
// the proto definition for this message. If any rules are violated, the first
3486
// error encountered is returned, or nil if there are no violations.
3487
func (m *WatchRequest) Validate() error {
3488
	return m.validate(false)
3489
}
3490
3491
// ValidateAll checks the field values on WatchRequest with the rules defined
3492
// in the proto definition for this message. If any rules are violated, the
3493
// result is a list of violation errors wrapped in WatchRequestMultiError, or
3494
// nil if none found.
3495
func (m *WatchRequest) ValidateAll() error {
3496
	return m.validate(true)
3497
}
3498
3499
func (m *WatchRequest) validate(all bool) error {
3500
	if m == nil {
3501
		return nil
3502
	}
3503
3504
	var errors []error
3505
3506
	if len(m.GetTenantId()) > 128 {
3507
		err := WatchRequestValidationError{
3508
			field:  "TenantId",
3509
			reason: "value length must be at most 128 bytes",
3510
		}
3511
		if !all {
3512
			return err
3513
		}
3514
		errors = append(errors, err)
3515
	}
3516
3517
	if !_WatchRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
3518
		err := WatchRequestValidationError{
3519
			field:  "TenantId",
3520
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
3521
		}
3522
		if !all {
3523
			return err
3524
		}
3525
		errors = append(errors, err)
3526
	}
3527
3528
	// no validation rules for SnapToken
3529
3530
	if len(errors) > 0 {
3531
		return WatchRequestMultiError(errors)
3532
	}
3533
3534
	return nil
3535
}
3536
3537
// WatchRequestMultiError is an error wrapping multiple validation errors
3538
// returned by WatchRequest.ValidateAll() if the designated constraints aren't met.
3539
type WatchRequestMultiError []error
3540
3541
// Error returns a concatenation of all the error messages it wraps.
3542
func (m WatchRequestMultiError) Error() string {
3543
	var msgs []string
3544
	for _, err := range m {
3545
		msgs = append(msgs, err.Error())
3546
	}
3547
	return strings.Join(msgs, "; ")
3548
}
3549
3550
// AllErrors returns a list of validation violation errors.
3551
func (m WatchRequestMultiError) AllErrors() []error { return m }
3552
3553
// WatchRequestValidationError is the validation error returned by
3554
// WatchRequest.Validate if the designated constraints aren't met.
3555
type WatchRequestValidationError struct {
3556
	field  string
3557
	reason string
3558
	cause  error
3559
	key    bool
3560
}
3561
3562
// Field function returns field value.
3563
func (e WatchRequestValidationError) Field() string { return e.field }
3564
3565
// Reason function returns reason value.
3566
func (e WatchRequestValidationError) Reason() string { return e.reason }
3567
3568
// Cause function returns cause value.
3569
func (e WatchRequestValidationError) Cause() error { return e.cause }
3570
3571
// Key function returns key value.
3572
func (e WatchRequestValidationError) Key() bool { return e.key }
3573
3574
// ErrorName returns error name.
3575
func (e WatchRequestValidationError) ErrorName() string { return "WatchRequestValidationError" }
3576
3577
// Error satisfies the builtin error interface
3578
func (e WatchRequestValidationError) Error() string {
3579
	cause := ""
3580
	if e.cause != nil {
3581
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3582
	}
3583
3584
	key := ""
3585
	if e.key {
3586
		key = "key for "
3587
	}
3588
3589
	return fmt.Sprintf(
3590
		"invalid %sWatchRequest.%s: %s%s",
3591
		key,
3592
		e.field,
3593
		e.reason,
3594
		cause)
3595
}
3596
3597
var _ error = WatchRequestValidationError{}
3598
3599
var _ interface {
3600
	Field() string
3601
	Reason() string
3602
	Key() bool
3603
	Cause() error
3604
	ErrorName() string
3605
} = WatchRequestValidationError{}
3606
3607
var _WatchRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
3608
3609
// Validate checks the field values on WatchResponse with the rules defined in
3610
// the proto definition for this message. If any rules are violated, the first
3611
// error encountered is returned, or nil if there are no violations.
3612
func (m *WatchResponse) Validate() error {
3613
	return m.validate(false)
3614
}
3615
3616
// ValidateAll checks the field values on WatchResponse with the rules defined
3617
// in the proto definition for this message. If any rules are violated, the
3618
// result is a list of violation errors wrapped in WatchResponseMultiError, or
3619
// nil if none found.
3620
func (m *WatchResponse) ValidateAll() error {
3621
	return m.validate(true)
3622
}
3623
3624
func (m *WatchResponse) validate(all bool) error {
3625
	if m == nil {
3626
		return nil
3627
	}
3628
3629
	var errors []error
3630
3631
	if all {
3632
		switch v := interface{}(m.GetChanges()).(type) {
3633
		case interface{ ValidateAll() error }:
3634
			if err := v.ValidateAll(); err != nil {
3635
				errors = append(errors, WatchResponseValidationError{
3636
					field:  "Changes",
3637
					reason: "embedded message failed validation",
3638
					cause:  err,
3639
				})
3640
			}
3641
		case interface{ Validate() error }:
3642
			if err := v.Validate(); err != nil {
3643
				errors = append(errors, WatchResponseValidationError{
3644
					field:  "Changes",
3645
					reason: "embedded message failed validation",
3646
					cause:  err,
3647
				})
3648
			}
3649
		}
3650
	} else if v, ok := interface{}(m.GetChanges()).(interface{ Validate() error }); ok {
3651
		if err := v.Validate(); err != nil {
3652
			return WatchResponseValidationError{
3653
				field:  "Changes",
3654
				reason: "embedded message failed validation",
3655
				cause:  err,
3656
			}
3657
		}
3658
	}
3659
3660
	if len(errors) > 0 {
3661
		return WatchResponseMultiError(errors)
3662
	}
3663
3664
	return nil
3665
}
3666
3667
// WatchResponseMultiError is an error wrapping multiple validation errors
3668
// returned by WatchResponse.ValidateAll() if the designated constraints
3669
// aren't met.
3670
type WatchResponseMultiError []error
3671
3672
// Error returns a concatenation of all the error messages it wraps.
3673
func (m WatchResponseMultiError) Error() string {
3674
	var msgs []string
3675
	for _, err := range m {
3676
		msgs = append(msgs, err.Error())
3677
	}
3678
	return strings.Join(msgs, "; ")
3679
}
3680
3681
// AllErrors returns a list of validation violation errors.
3682
func (m WatchResponseMultiError) AllErrors() []error { return m }
3683
3684
// WatchResponseValidationError is the validation error returned by
3685
// WatchResponse.Validate if the designated constraints aren't met.
3686
type WatchResponseValidationError struct {
3687
	field  string
3688
	reason string
3689
	cause  error
3690
	key    bool
3691
}
3692
3693
// Field function returns field value.
3694
func (e WatchResponseValidationError) Field() string { return e.field }
3695
3696
// Reason function returns reason value.
3697
func (e WatchResponseValidationError) Reason() string { return e.reason }
3698
3699
// Cause function returns cause value.
3700
func (e WatchResponseValidationError) Cause() error { return e.cause }
3701
3702
// Key function returns key value.
3703
func (e WatchResponseValidationError) Key() bool { return e.key }
3704
3705
// ErrorName returns error name.
3706
func (e WatchResponseValidationError) ErrorName() string { return "WatchResponseValidationError" }
3707
3708
// Error satisfies the builtin error interface
3709
func (e WatchResponseValidationError) Error() string {
3710
	cause := ""
3711
	if e.cause != nil {
3712
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3713
	}
3714
3715
	key := ""
3716
	if e.key {
3717
		key = "key for "
3718
	}
3719
3720
	return fmt.Sprintf(
3721
		"invalid %sWatchResponse.%s: %s%s",
3722
		key,
3723
		e.field,
3724
		e.reason,
3725
		cause)
3726
}
3727
3728
var _ error = WatchResponseValidationError{}
3729
3730
var _ interface {
3731
	Field() string
3732
	Reason() string
3733
	Key() bool
3734
	Cause() error
3735
	ErrorName() string
3736
} = WatchResponseValidationError{}
3737
3738
// Validate checks the field values on SchemaWriteRequest with the rules
3739
// defined in the proto definition for this message. If any rules are
3740
// violated, the first error encountered is returned, or nil if there are no violations.
3741
func (m *SchemaWriteRequest) Validate() error {
3742
	return m.validate(false)
3743
}
3744
3745
// ValidateAll checks the field values on SchemaWriteRequest with the rules
3746
// defined in the proto definition for this message. If any rules are
3747
// violated, the result is a list of violation errors wrapped in
3748
// SchemaWriteRequestMultiError, or nil if none found.
3749
func (m *SchemaWriteRequest) ValidateAll() error {
3750
	return m.validate(true)
3751
}
3752
3753
func (m *SchemaWriteRequest) validate(all bool) error {
3754
	if m == nil {
3755
		return nil
3756
	}
3757
3758
	var errors []error
3759
3760
	if len(m.GetTenantId()) > 128 {
3761
		err := SchemaWriteRequestValidationError{
3762
			field:  "TenantId",
3763
			reason: "value length must be at most 128 bytes",
3764
		}
3765
		if !all {
3766
			return err
3767
		}
3768
		errors = append(errors, err)
3769
	}
3770
3771
	if !_SchemaWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
3772
		err := SchemaWriteRequestValidationError{
3773
			field:  "TenantId",
3774
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
3775
		}
3776
		if !all {
3777
			return err
3778
		}
3779
		errors = append(errors, err)
3780
	}
3781
3782
	// no validation rules for Schema
3783
3784
	if len(errors) > 0 {
3785
		return SchemaWriteRequestMultiError(errors)
3786
	}
3787
3788
	return nil
3789
}
3790
3791
// SchemaWriteRequestMultiError is an error wrapping multiple validation errors
3792
// returned by SchemaWriteRequest.ValidateAll() if the designated constraints
3793
// aren't met.
3794
type SchemaWriteRequestMultiError []error
3795
3796
// Error returns a concatenation of all the error messages it wraps.
3797
func (m SchemaWriteRequestMultiError) Error() string {
3798
	var msgs []string
3799
	for _, err := range m {
3800
		msgs = append(msgs, err.Error())
3801
	}
3802
	return strings.Join(msgs, "; ")
3803
}
3804
3805
// AllErrors returns a list of validation violation errors.
3806
func (m SchemaWriteRequestMultiError) AllErrors() []error { return m }
3807
3808
// SchemaWriteRequestValidationError is the validation error returned by
3809
// SchemaWriteRequest.Validate if the designated constraints aren't met.
3810
type SchemaWriteRequestValidationError struct {
3811
	field  string
3812
	reason string
3813
	cause  error
3814
	key    bool
3815
}
3816
3817
// Field function returns field value.
3818
func (e SchemaWriteRequestValidationError) Field() string { return e.field }
3819
3820
// Reason function returns reason value.
3821
func (e SchemaWriteRequestValidationError) Reason() string { return e.reason }
3822
3823
// Cause function returns cause value.
3824
func (e SchemaWriteRequestValidationError) Cause() error { return e.cause }
3825
3826
// Key function returns key value.
3827
func (e SchemaWriteRequestValidationError) Key() bool { return e.key }
3828
3829
// ErrorName returns error name.
3830
func (e SchemaWriteRequestValidationError) ErrorName() string {
3831
	return "SchemaWriteRequestValidationError"
3832
}
3833
3834
// Error satisfies the builtin error interface
3835
func (e SchemaWriteRequestValidationError) Error() string {
3836
	cause := ""
3837
	if e.cause != nil {
3838
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3839
	}
3840
3841
	key := ""
3842
	if e.key {
3843
		key = "key for "
3844
	}
3845
3846
	return fmt.Sprintf(
3847
		"invalid %sSchemaWriteRequest.%s: %s%s",
3848
		key,
3849
		e.field,
3850
		e.reason,
3851
		cause)
3852
}
3853
3854
var _ error = SchemaWriteRequestValidationError{}
3855
3856
var _ interface {
3857
	Field() string
3858
	Reason() string
3859
	Key() bool
3860
	Cause() error
3861
	ErrorName() string
3862
} = SchemaWriteRequestValidationError{}
3863
3864
var _SchemaWriteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
3865
3866
// Validate checks the field values on SchemaWriteResponse with the rules
3867
// defined in the proto definition for this message. If any rules are
3868
// violated, the first error encountered is returned, or nil if there are no violations.
3869
func (m *SchemaWriteResponse) Validate() error {
3870
	return m.validate(false)
3871
}
3872
3873
// ValidateAll checks the field values on SchemaWriteResponse with the rules
3874
// defined in the proto definition for this message. If any rules are
3875
// violated, the result is a list of violation errors wrapped in
3876
// SchemaWriteResponseMultiError, or nil if none found.
3877
func (m *SchemaWriteResponse) ValidateAll() error {
3878
	return m.validate(true)
3879
}
3880
3881
func (m *SchemaWriteResponse) validate(all bool) error {
3882
	if m == nil {
3883
		return nil
3884
	}
3885
3886
	var errors []error
3887
3888
	// no validation rules for SchemaVersion
3889
3890
	if len(errors) > 0 {
3891
		return SchemaWriteResponseMultiError(errors)
3892
	}
3893
3894
	return nil
3895
}
3896
3897
// SchemaWriteResponseMultiError is an error wrapping multiple validation
3898
// errors returned by SchemaWriteResponse.ValidateAll() if the designated
3899
// constraints aren't met.
3900
type SchemaWriteResponseMultiError []error
3901
3902
// Error returns a concatenation of all the error messages it wraps.
3903
func (m SchemaWriteResponseMultiError) Error() string {
3904
	var msgs []string
3905
	for _, err := range m {
3906
		msgs = append(msgs, err.Error())
3907
	}
3908
	return strings.Join(msgs, "; ")
3909
}
3910
3911
// AllErrors returns a list of validation violation errors.
3912
func (m SchemaWriteResponseMultiError) AllErrors() []error { return m }
3913
3914
// SchemaWriteResponseValidationError is the validation error returned by
3915
// SchemaWriteResponse.Validate if the designated constraints aren't met.
3916
type SchemaWriteResponseValidationError struct {
3917
	field  string
3918
	reason string
3919
	cause  error
3920
	key    bool
3921
}
3922
3923
// Field function returns field value.
3924
func (e SchemaWriteResponseValidationError) Field() string { return e.field }
3925
3926
// Reason function returns reason value.
3927
func (e SchemaWriteResponseValidationError) Reason() string { return e.reason }
3928
3929
// Cause function returns cause value.
3930
func (e SchemaWriteResponseValidationError) Cause() error { return e.cause }
3931
3932
// Key function returns key value.
3933
func (e SchemaWriteResponseValidationError) Key() bool { return e.key }
3934
3935
// ErrorName returns error name.
3936
func (e SchemaWriteResponseValidationError) ErrorName() string {
3937
	return "SchemaWriteResponseValidationError"
3938
}
3939
3940
// Error satisfies the builtin error interface
3941
func (e SchemaWriteResponseValidationError) Error() string {
3942
	cause := ""
3943
	if e.cause != nil {
3944
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
3945
	}
3946
3947
	key := ""
3948
	if e.key {
3949
		key = "key for "
3950
	}
3951
3952
	return fmt.Sprintf(
3953
		"invalid %sSchemaWriteResponse.%s: %s%s",
3954
		key,
3955
		e.field,
3956
		e.reason,
3957
		cause)
3958
}
3959
3960
var _ error = SchemaWriteResponseValidationError{}
3961
3962
var _ interface {
3963
	Field() string
3964
	Reason() string
3965
	Key() bool
3966
	Cause() error
3967
	ErrorName() string
3968
} = SchemaWriteResponseValidationError{}
3969
3970
// Validate checks the field values on SchemaPartialWriteRequest with the rules
3971
// defined in the proto definition for this message. If any rules are
3972
// violated, the first error encountered is returned, or nil if there are no violations.
3973
func (m *SchemaPartialWriteRequest) Validate() error {
3974
	return m.validate(false)
3975
}
3976
3977
// ValidateAll checks the field values on SchemaPartialWriteRequest with the
3978
// rules defined in the proto definition for this message. If any rules are
3979
// violated, the result is a list of violation errors wrapped in
3980
// SchemaPartialWriteRequestMultiError, or nil if none found.
3981
func (m *SchemaPartialWriteRequest) ValidateAll() error {
3982
	return m.validate(true)
3983
}
3984
3985
func (m *SchemaPartialWriteRequest) validate(all bool) error {
3986
	if m == nil {
3987
		return nil
3988
	}
3989
3990
	var errors []error
3991
3992
	if len(m.GetTenantId()) > 128 {
3993
		err := SchemaPartialWriteRequestValidationError{
3994
			field:  "TenantId",
3995
			reason: "value length must be at most 128 bytes",
3996
		}
3997
		if !all {
3998
			return err
3999
		}
4000
		errors = append(errors, err)
4001
	}
4002
4003
	if !_SchemaPartialWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
4004
		err := SchemaPartialWriteRequestValidationError{
4005
			field:  "TenantId",
4006
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
4007
		}
4008
		if !all {
4009
			return err
4010
		}
4011
		errors = append(errors, err)
4012
	}
4013
4014
	if m.GetMetadata() == nil {
4015
		err := SchemaPartialWriteRequestValidationError{
4016
			field:  "Metadata",
4017
			reason: "value is required",
4018
		}
4019
		if !all {
4020
			return err
4021
		}
4022
		errors = append(errors, err)
4023
	}
4024
4025
	if all {
4026
		switch v := interface{}(m.GetMetadata()).(type) {
4027
		case interface{ ValidateAll() error }:
4028
			if err := v.ValidateAll(); err != nil {
4029
				errors = append(errors, SchemaPartialWriteRequestValidationError{
4030
					field:  "Metadata",
4031
					reason: "embedded message failed validation",
4032
					cause:  err,
4033
				})
4034
			}
4035
		case interface{ Validate() error }:
4036
			if err := v.Validate(); err != nil {
4037
				errors = append(errors, SchemaPartialWriteRequestValidationError{
4038
					field:  "Metadata",
4039
					reason: "embedded message failed validation",
4040
					cause:  err,
4041
				})
4042
			}
4043
		}
4044
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
4045
		if err := v.Validate(); err != nil {
4046
			return SchemaPartialWriteRequestValidationError{
4047
				field:  "Metadata",
4048
				reason: "embedded message failed validation",
4049
				cause:  err,
4050
			}
4051
		}
4052
	}
4053
4054
	{
4055
		sorted_keys := make([]string, len(m.GetPartials()))
4056
		i := 0
4057
		for key := range m.GetPartials() {
4058
			sorted_keys[i] = key
4059
			i++
4060
		}
4061
		sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
4062
		for _, key := range sorted_keys {
4063
			val := m.GetPartials()[key]
4064
			_ = val
4065
4066
			// no validation rules for Partials[key]
4067
4068
			if all {
4069
				switch v := interface{}(val).(type) {
4070
				case interface{ ValidateAll() error }:
4071
					if err := v.ValidateAll(); err != nil {
4072
						errors = append(errors, SchemaPartialWriteRequestValidationError{
4073
							field:  fmt.Sprintf("Partials[%v]", key),
4074
							reason: "embedded message failed validation",
4075
							cause:  err,
4076
						})
4077
					}
4078
				case interface{ Validate() error }:
4079
					if err := v.Validate(); err != nil {
4080
						errors = append(errors, SchemaPartialWriteRequestValidationError{
4081
							field:  fmt.Sprintf("Partials[%v]", key),
4082
							reason: "embedded message failed validation",
4083
							cause:  err,
4084
						})
4085
					}
4086
				}
4087
			} else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
4088
				if err := v.Validate(); err != nil {
4089
					return SchemaPartialWriteRequestValidationError{
4090
						field:  fmt.Sprintf("Partials[%v]", key),
4091
						reason: "embedded message failed validation",
4092
						cause:  err,
4093
					}
4094
				}
4095
			}
4096
4097
		}
4098
	}
4099
4100
	if len(errors) > 0 {
4101
		return SchemaPartialWriteRequestMultiError(errors)
4102
	}
4103
4104
	return nil
4105
}
4106
4107
// SchemaPartialWriteRequestMultiError is an error wrapping multiple validation
4108
// errors returned by SchemaPartialWriteRequest.ValidateAll() if the
4109
// designated constraints aren't met.
4110
type SchemaPartialWriteRequestMultiError []error
4111
4112
// Error returns a concatenation of all the error messages it wraps.
4113
func (m SchemaPartialWriteRequestMultiError) Error() string {
4114
	var msgs []string
4115
	for _, err := range m {
4116
		msgs = append(msgs, err.Error())
4117
	}
4118
	return strings.Join(msgs, "; ")
4119
}
4120
4121
// AllErrors returns a list of validation violation errors.
4122
func (m SchemaPartialWriteRequestMultiError) AllErrors() []error { return m }
4123
4124
// SchemaPartialWriteRequestValidationError is the validation error returned by
4125
// SchemaPartialWriteRequest.Validate if the designated constraints aren't met.
4126
type SchemaPartialWriteRequestValidationError struct {
4127
	field  string
4128
	reason string
4129
	cause  error
4130
	key    bool
4131
}
4132
4133
// Field function returns field value.
4134
func (e SchemaPartialWriteRequestValidationError) Field() string { return e.field }
4135
4136
// Reason function returns reason value.
4137
func (e SchemaPartialWriteRequestValidationError) Reason() string { return e.reason }
4138
4139
// Cause function returns cause value.
4140
func (e SchemaPartialWriteRequestValidationError) Cause() error { return e.cause }
4141
4142
// Key function returns key value.
4143
func (e SchemaPartialWriteRequestValidationError) Key() bool { return e.key }
4144
4145
// ErrorName returns error name.
4146
func (e SchemaPartialWriteRequestValidationError) ErrorName() string {
4147
	return "SchemaPartialWriteRequestValidationError"
4148
}
4149
4150
// Error satisfies the builtin error interface
4151
func (e SchemaPartialWriteRequestValidationError) Error() string {
4152
	cause := ""
4153
	if e.cause != nil {
4154
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4155
	}
4156
4157
	key := ""
4158
	if e.key {
4159
		key = "key for "
4160
	}
4161
4162
	return fmt.Sprintf(
4163
		"invalid %sSchemaPartialWriteRequest.%s: %s%s",
4164
		key,
4165
		e.field,
4166
		e.reason,
4167
		cause)
4168
}
4169
4170
var _ error = SchemaPartialWriteRequestValidationError{}
4171
4172
var _ interface {
4173
	Field() string
4174
	Reason() string
4175
	Key() bool
4176
	Cause() error
4177
	ErrorName() string
4178
} = SchemaPartialWriteRequestValidationError{}
4179
4180
var _SchemaPartialWriteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
4181
4182
// Validate checks the field values on SchemaPartialWriteRequestMetadata with
4183
// the rules defined in the proto definition for this message. If any rules
4184
// are violated, the first error encountered is returned, or nil if there are
4185
// no violations.
4186
func (m *SchemaPartialWriteRequestMetadata) Validate() error {
4187
	return m.validate(false)
4188
}
4189
4190
// ValidateAll checks the field values on SchemaPartialWriteRequestMetadata
4191
// with the rules defined in the proto definition for this message. If any
4192
// rules are violated, the result is a list of violation errors wrapped in
4193
// SchemaPartialWriteRequestMetadataMultiError, or nil if none found.
4194
func (m *SchemaPartialWriteRequestMetadata) ValidateAll() error {
4195
	return m.validate(true)
4196
}
4197
4198
func (m *SchemaPartialWriteRequestMetadata) validate(all bool) error {
4199
	if m == nil {
4200
		return nil
4201
	}
4202
4203
	var errors []error
4204
4205
	// no validation rules for SchemaVersion
4206
4207
	if len(errors) > 0 {
4208
		return SchemaPartialWriteRequestMetadataMultiError(errors)
4209
	}
4210
4211
	return nil
4212
}
4213
4214
// SchemaPartialWriteRequestMetadataMultiError is an error wrapping multiple
4215
// validation errors returned by
4216
// SchemaPartialWriteRequestMetadata.ValidateAll() if the designated
4217
// constraints aren't met.
4218
type SchemaPartialWriteRequestMetadataMultiError []error
4219
4220
// Error returns a concatenation of all the error messages it wraps.
4221
func (m SchemaPartialWriteRequestMetadataMultiError) Error() string {
4222
	var msgs []string
4223
	for _, err := range m {
4224
		msgs = append(msgs, err.Error())
4225
	}
4226
	return strings.Join(msgs, "; ")
4227
}
4228
4229
// AllErrors returns a list of validation violation errors.
4230
func (m SchemaPartialWriteRequestMetadataMultiError) AllErrors() []error { return m }
4231
4232
// SchemaPartialWriteRequestMetadataValidationError is the validation error
4233
// returned by SchemaPartialWriteRequestMetadata.Validate if the designated
4234
// constraints aren't met.
4235
type SchemaPartialWriteRequestMetadataValidationError struct {
4236
	field  string
4237
	reason string
4238
	cause  error
4239
	key    bool
4240
}
4241
4242
// Field function returns field value.
4243
func (e SchemaPartialWriteRequestMetadataValidationError) Field() string { return e.field }
4244
4245
// Reason function returns reason value.
4246
func (e SchemaPartialWriteRequestMetadataValidationError) Reason() string { return e.reason }
4247
4248
// Cause function returns cause value.
4249
func (e SchemaPartialWriteRequestMetadataValidationError) Cause() error { return e.cause }
4250
4251
// Key function returns key value.
4252
func (e SchemaPartialWriteRequestMetadataValidationError) Key() bool { return e.key }
4253
4254
// ErrorName returns error name.
4255
func (e SchemaPartialWriteRequestMetadataValidationError) ErrorName() string {
4256
	return "SchemaPartialWriteRequestMetadataValidationError"
4257
}
4258
4259
// Error satisfies the builtin error interface
4260
func (e SchemaPartialWriteRequestMetadataValidationError) Error() string {
4261
	cause := ""
4262
	if e.cause != nil {
4263
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4264
	}
4265
4266
	key := ""
4267
	if e.key {
4268
		key = "key for "
4269
	}
4270
4271
	return fmt.Sprintf(
4272
		"invalid %sSchemaPartialWriteRequestMetadata.%s: %s%s",
4273
		key,
4274
		e.field,
4275
		e.reason,
4276
		cause)
4277
}
4278
4279
var _ error = SchemaPartialWriteRequestMetadataValidationError{}
4280
4281
var _ interface {
4282
	Field() string
4283
	Reason() string
4284
	Key() bool
4285
	Cause() error
4286
	ErrorName() string
4287
} = SchemaPartialWriteRequestMetadataValidationError{}
4288
4289
// Validate checks the field values on SchemaPartialWriteResponse with the
4290
// rules defined in the proto definition for this message. If any rules are
4291
// violated, the first error encountered is returned, or nil if there are no violations.
4292
func (m *SchemaPartialWriteResponse) Validate() error {
4293
	return m.validate(false)
4294
}
4295
4296
// ValidateAll checks the field values on SchemaPartialWriteResponse with the
4297
// rules defined in the proto definition for this message. If any rules are
4298
// violated, the result is a list of violation errors wrapped in
4299
// SchemaPartialWriteResponseMultiError, or nil if none found.
4300
func (m *SchemaPartialWriteResponse) ValidateAll() error {
4301
	return m.validate(true)
4302
}
4303
4304
func (m *SchemaPartialWriteResponse) validate(all bool) error {
4305
	if m == nil {
4306
		return nil
4307
	}
4308
4309
	var errors []error
4310
4311
	// no validation rules for SchemaVersion
4312
4313
	if len(errors) > 0 {
4314
		return SchemaPartialWriteResponseMultiError(errors)
4315
	}
4316
4317
	return nil
4318
}
4319
4320
// SchemaPartialWriteResponseMultiError is an error wrapping multiple
4321
// validation errors returned by SchemaPartialWriteResponse.ValidateAll() if
4322
// the designated constraints aren't met.
4323
type SchemaPartialWriteResponseMultiError []error
4324
4325
// Error returns a concatenation of all the error messages it wraps.
4326
func (m SchemaPartialWriteResponseMultiError) Error() string {
4327
	var msgs []string
4328
	for _, err := range m {
4329
		msgs = append(msgs, err.Error())
4330
	}
4331
	return strings.Join(msgs, "; ")
4332
}
4333
4334
// AllErrors returns a list of validation violation errors.
4335
func (m SchemaPartialWriteResponseMultiError) AllErrors() []error { return m }
4336
4337
// SchemaPartialWriteResponseValidationError is the validation error returned
4338
// by SchemaPartialWriteResponse.Validate if the designated constraints aren't met.
4339
type SchemaPartialWriteResponseValidationError struct {
4340
	field  string
4341
	reason string
4342
	cause  error
4343
	key    bool
4344
}
4345
4346
// Field function returns field value.
4347
func (e SchemaPartialWriteResponseValidationError) Field() string { return e.field }
4348
4349
// Reason function returns reason value.
4350
func (e SchemaPartialWriteResponseValidationError) Reason() string { return e.reason }
4351
4352
// Cause function returns cause value.
4353
func (e SchemaPartialWriteResponseValidationError) Cause() error { return e.cause }
4354
4355
// Key function returns key value.
4356
func (e SchemaPartialWriteResponseValidationError) Key() bool { return e.key }
4357
4358
// ErrorName returns error name.
4359
func (e SchemaPartialWriteResponseValidationError) ErrorName() string {
4360
	return "SchemaPartialWriteResponseValidationError"
4361
}
4362
4363
// Error satisfies the builtin error interface
4364
func (e SchemaPartialWriteResponseValidationError) Error() string {
4365
	cause := ""
4366
	if e.cause != nil {
4367
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4368
	}
4369
4370
	key := ""
4371
	if e.key {
4372
		key = "key for "
4373
	}
4374
4375
	return fmt.Sprintf(
4376
		"invalid %sSchemaPartialWriteResponse.%s: %s%s",
4377
		key,
4378
		e.field,
4379
		e.reason,
4380
		cause)
4381
}
4382
4383
var _ error = SchemaPartialWriteResponseValidationError{}
4384
4385
var _ interface {
4386
	Field() string
4387
	Reason() string
4388
	Key() bool
4389
	Cause() error
4390
	ErrorName() string
4391
} = SchemaPartialWriteResponseValidationError{}
4392
4393
// Validate checks the field values on SchemaReadRequest with the rules defined
4394
// in the proto definition for this message. If any rules are violated, the
4395
// first error encountered is returned, or nil if there are no violations.
4396
func (m *SchemaReadRequest) Validate() error {
4397
	return m.validate(false)
4398
}
4399
4400
// ValidateAll checks the field values on SchemaReadRequest with the rules
4401
// defined in the proto definition for this message. If any rules are
4402
// violated, the result is a list of violation errors wrapped in
4403
// SchemaReadRequestMultiError, or nil if none found.
4404
func (m *SchemaReadRequest) ValidateAll() error {
4405
	return m.validate(true)
4406
}
4407
4408
func (m *SchemaReadRequest) validate(all bool) error {
4409
	if m == nil {
4410
		return nil
4411
	}
4412
4413
	var errors []error
4414
4415
	if len(m.GetTenantId()) > 128 {
4416
		err := SchemaReadRequestValidationError{
4417
			field:  "TenantId",
4418
			reason: "value length must be at most 128 bytes",
4419
		}
4420
		if !all {
4421
			return err
4422
		}
4423
		errors = append(errors, err)
4424
	}
4425
4426
	if !_SchemaReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
4427
		err := SchemaReadRequestValidationError{
4428
			field:  "TenantId",
4429
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
4430
		}
4431
		if !all {
4432
			return err
4433
		}
4434
		errors = append(errors, err)
4435
	}
4436
4437
	if m.GetMetadata() == nil {
4438
		err := SchemaReadRequestValidationError{
4439
			field:  "Metadata",
4440
			reason: "value is required",
4441
		}
4442
		if !all {
4443
			return err
4444
		}
4445
		errors = append(errors, err)
4446
	}
4447
4448
	if all {
4449
		switch v := interface{}(m.GetMetadata()).(type) {
4450
		case interface{ ValidateAll() error }:
4451
			if err := v.ValidateAll(); err != nil {
4452
				errors = append(errors, SchemaReadRequestValidationError{
4453
					field:  "Metadata",
4454
					reason: "embedded message failed validation",
4455
					cause:  err,
4456
				})
4457
			}
4458
		case interface{ Validate() error }:
4459
			if err := v.Validate(); err != nil {
4460
				errors = append(errors, SchemaReadRequestValidationError{
4461
					field:  "Metadata",
4462
					reason: "embedded message failed validation",
4463
					cause:  err,
4464
				})
4465
			}
4466
		}
4467
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
4468
		if err := v.Validate(); err != nil {
4469
			return SchemaReadRequestValidationError{
4470
				field:  "Metadata",
4471
				reason: "embedded message failed validation",
4472
				cause:  err,
4473
			}
4474
		}
4475
	}
4476
4477
	if len(errors) > 0 {
4478
		return SchemaReadRequestMultiError(errors)
4479
	}
4480
4481
	return nil
4482
}
4483
4484
// SchemaReadRequestMultiError is an error wrapping multiple validation errors
4485
// returned by SchemaReadRequest.ValidateAll() if the designated constraints
4486
// aren't met.
4487
type SchemaReadRequestMultiError []error
4488
4489
// Error returns a concatenation of all the error messages it wraps.
4490
func (m SchemaReadRequestMultiError) Error() string {
4491
	var msgs []string
4492
	for _, err := range m {
4493
		msgs = append(msgs, err.Error())
4494
	}
4495
	return strings.Join(msgs, "; ")
4496
}
4497
4498
// AllErrors returns a list of validation violation errors.
4499
func (m SchemaReadRequestMultiError) AllErrors() []error { return m }
4500
4501
// SchemaReadRequestValidationError is the validation error returned by
4502
// SchemaReadRequest.Validate if the designated constraints aren't met.
4503
type SchemaReadRequestValidationError struct {
4504
	field  string
4505
	reason string
4506
	cause  error
4507
	key    bool
4508
}
4509
4510
// Field function returns field value.
4511
func (e SchemaReadRequestValidationError) Field() string { return e.field }
4512
4513
// Reason function returns reason value.
4514
func (e SchemaReadRequestValidationError) Reason() string { return e.reason }
4515
4516
// Cause function returns cause value.
4517
func (e SchemaReadRequestValidationError) Cause() error { return e.cause }
4518
4519
// Key function returns key value.
4520
func (e SchemaReadRequestValidationError) Key() bool { return e.key }
4521
4522
// ErrorName returns error name.
4523
func (e SchemaReadRequestValidationError) ErrorName() string {
4524
	return "SchemaReadRequestValidationError"
4525
}
4526
4527
// Error satisfies the builtin error interface
4528
func (e SchemaReadRequestValidationError) Error() string {
4529
	cause := ""
4530
	if e.cause != nil {
4531
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4532
	}
4533
4534
	key := ""
4535
	if e.key {
4536
		key = "key for "
4537
	}
4538
4539
	return fmt.Sprintf(
4540
		"invalid %sSchemaReadRequest.%s: %s%s",
4541
		key,
4542
		e.field,
4543
		e.reason,
4544
		cause)
4545
}
4546
4547
var _ error = SchemaReadRequestValidationError{}
4548
4549
var _ interface {
4550
	Field() string
4551
	Reason() string
4552
	Key() bool
4553
	Cause() error
4554
	ErrorName() string
4555
} = SchemaReadRequestValidationError{}
4556
4557
var _SchemaReadRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
4558
4559
// Validate checks the field values on SchemaReadRequestMetadata with the rules
4560
// defined in the proto definition for this message. If any rules are
4561
// violated, the first error encountered is returned, or nil if there are no violations.
4562
func (m *SchemaReadRequestMetadata) Validate() error {
4563
	return m.validate(false)
4564
}
4565
4566
// ValidateAll checks the field values on SchemaReadRequestMetadata with the
4567
// rules defined in the proto definition for this message. If any rules are
4568
// violated, the result is a list of violation errors wrapped in
4569
// SchemaReadRequestMetadataMultiError, or nil if none found.
4570
func (m *SchemaReadRequestMetadata) ValidateAll() error {
4571
	return m.validate(true)
4572
}
4573
4574
func (m *SchemaReadRequestMetadata) validate(all bool) error {
4575
	if m == nil {
4576
		return nil
4577
	}
4578
4579
	var errors []error
4580
4581
	// no validation rules for SchemaVersion
4582
4583
	if len(errors) > 0 {
4584
		return SchemaReadRequestMetadataMultiError(errors)
4585
	}
4586
4587
	return nil
4588
}
4589
4590
// SchemaReadRequestMetadataMultiError is an error wrapping multiple validation
4591
// errors returned by SchemaReadRequestMetadata.ValidateAll() if the
4592
// designated constraints aren't met.
4593
type SchemaReadRequestMetadataMultiError []error
4594
4595
// Error returns a concatenation of all the error messages it wraps.
4596
func (m SchemaReadRequestMetadataMultiError) Error() string {
4597
	var msgs []string
4598
	for _, err := range m {
4599
		msgs = append(msgs, err.Error())
4600
	}
4601
	return strings.Join(msgs, "; ")
4602
}
4603
4604
// AllErrors returns a list of validation violation errors.
4605
func (m SchemaReadRequestMetadataMultiError) AllErrors() []error { return m }
4606
4607
// SchemaReadRequestMetadataValidationError is the validation error returned by
4608
// SchemaReadRequestMetadata.Validate if the designated constraints aren't met.
4609
type SchemaReadRequestMetadataValidationError struct {
4610
	field  string
4611
	reason string
4612
	cause  error
4613
	key    bool
4614
}
4615
4616
// Field function returns field value.
4617
func (e SchemaReadRequestMetadataValidationError) Field() string { return e.field }
4618
4619
// Reason function returns reason value.
4620
func (e SchemaReadRequestMetadataValidationError) Reason() string { return e.reason }
4621
4622
// Cause function returns cause value.
4623
func (e SchemaReadRequestMetadataValidationError) Cause() error { return e.cause }
4624
4625
// Key function returns key value.
4626
func (e SchemaReadRequestMetadataValidationError) Key() bool { return e.key }
4627
4628
// ErrorName returns error name.
4629
func (e SchemaReadRequestMetadataValidationError) ErrorName() string {
4630
	return "SchemaReadRequestMetadataValidationError"
4631
}
4632
4633
// Error satisfies the builtin error interface
4634
func (e SchemaReadRequestMetadataValidationError) Error() string {
4635
	cause := ""
4636
	if e.cause != nil {
4637
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4638
	}
4639
4640
	key := ""
4641
	if e.key {
4642
		key = "key for "
4643
	}
4644
4645
	return fmt.Sprintf(
4646
		"invalid %sSchemaReadRequestMetadata.%s: %s%s",
4647
		key,
4648
		e.field,
4649
		e.reason,
4650
		cause)
4651
}
4652
4653
var _ error = SchemaReadRequestMetadataValidationError{}
4654
4655
var _ interface {
4656
	Field() string
4657
	Reason() string
4658
	Key() bool
4659
	Cause() error
4660
	ErrorName() string
4661
} = SchemaReadRequestMetadataValidationError{}
4662
4663
// Validate checks the field values on SchemaReadResponse with the rules
4664
// defined in the proto definition for this message. If any rules are
4665
// violated, the first error encountered is returned, or nil if there are no violations.
4666
func (m *SchemaReadResponse) Validate() error {
4667
	return m.validate(false)
4668
}
4669
4670
// ValidateAll checks the field values on SchemaReadResponse with the rules
4671
// defined in the proto definition for this message. If any rules are
4672
// violated, the result is a list of violation errors wrapped in
4673
// SchemaReadResponseMultiError, or nil if none found.
4674
func (m *SchemaReadResponse) ValidateAll() error {
4675
	return m.validate(true)
4676
}
4677
4678
func (m *SchemaReadResponse) validate(all bool) error {
4679
	if m == nil {
4680
		return nil
4681
	}
4682
4683
	var errors []error
4684
4685
	if all {
4686
		switch v := interface{}(m.GetSchema()).(type) {
4687
		case interface{ ValidateAll() error }:
4688
			if err := v.ValidateAll(); err != nil {
4689
				errors = append(errors, SchemaReadResponseValidationError{
4690
					field:  "Schema",
4691
					reason: "embedded message failed validation",
4692
					cause:  err,
4693
				})
4694
			}
4695
		case interface{ Validate() error }:
4696
			if err := v.Validate(); err != nil {
4697
				errors = append(errors, SchemaReadResponseValidationError{
4698
					field:  "Schema",
4699
					reason: "embedded message failed validation",
4700
					cause:  err,
4701
				})
4702
			}
4703
		}
4704
	} else if v, ok := interface{}(m.GetSchema()).(interface{ Validate() error }); ok {
4705
		if err := v.Validate(); err != nil {
4706
			return SchemaReadResponseValidationError{
4707
				field:  "Schema",
4708
				reason: "embedded message failed validation",
4709
				cause:  err,
4710
			}
4711
		}
4712
	}
4713
4714
	if len(errors) > 0 {
4715
		return SchemaReadResponseMultiError(errors)
4716
	}
4717
4718
	return nil
4719
}
4720
4721
// SchemaReadResponseMultiError is an error wrapping multiple validation errors
4722
// returned by SchemaReadResponse.ValidateAll() if the designated constraints
4723
// aren't met.
4724
type SchemaReadResponseMultiError []error
4725
4726
// Error returns a concatenation of all the error messages it wraps.
4727
func (m SchemaReadResponseMultiError) Error() string {
4728
	var msgs []string
4729
	for _, err := range m {
4730
		msgs = append(msgs, err.Error())
4731
	}
4732
	return strings.Join(msgs, "; ")
4733
}
4734
4735
// AllErrors returns a list of validation violation errors.
4736
func (m SchemaReadResponseMultiError) AllErrors() []error { return m }
4737
4738
// SchemaReadResponseValidationError is the validation error returned by
4739
// SchemaReadResponse.Validate if the designated constraints aren't met.
4740
type SchemaReadResponseValidationError struct {
4741
	field  string
4742
	reason string
4743
	cause  error
4744
	key    bool
4745
}
4746
4747
// Field function returns field value.
4748
func (e SchemaReadResponseValidationError) Field() string { return e.field }
4749
4750
// Reason function returns reason value.
4751
func (e SchemaReadResponseValidationError) Reason() string { return e.reason }
4752
4753
// Cause function returns cause value.
4754
func (e SchemaReadResponseValidationError) Cause() error { return e.cause }
4755
4756
// Key function returns key value.
4757
func (e SchemaReadResponseValidationError) Key() bool { return e.key }
4758
4759
// ErrorName returns error name.
4760
func (e SchemaReadResponseValidationError) ErrorName() string {
4761
	return "SchemaReadResponseValidationError"
4762
}
4763
4764
// Error satisfies the builtin error interface
4765
func (e SchemaReadResponseValidationError) Error() string {
4766
	cause := ""
4767
	if e.cause != nil {
4768
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4769
	}
4770
4771
	key := ""
4772
	if e.key {
4773
		key = "key for "
4774
	}
4775
4776
	return fmt.Sprintf(
4777
		"invalid %sSchemaReadResponse.%s: %s%s",
4778
		key,
4779
		e.field,
4780
		e.reason,
4781
		cause)
4782
}
4783
4784
var _ error = SchemaReadResponseValidationError{}
4785
4786
var _ interface {
4787
	Field() string
4788
	Reason() string
4789
	Key() bool
4790
	Cause() error
4791
	ErrorName() string
4792
} = SchemaReadResponseValidationError{}
4793
4794
// Validate checks the field values on SchemaListRequest with the rules defined
4795
// in the proto definition for this message. If any rules are violated, the
4796
// first error encountered is returned, or nil if there are no violations.
4797
func (m *SchemaListRequest) Validate() error {
4798
	return m.validate(false)
4799
}
4800
4801
// ValidateAll checks the field values on SchemaListRequest with the rules
4802
// defined in the proto definition for this message. If any rules are
4803
// violated, the result is a list of violation errors wrapped in
4804
// SchemaListRequestMultiError, or nil if none found.
4805
func (m *SchemaListRequest) ValidateAll() error {
4806
	return m.validate(true)
4807
}
4808
4809
func (m *SchemaListRequest) validate(all bool) error {
4810
	if m == nil {
4811
		return nil
4812
	}
4813
4814
	var errors []error
4815
4816
	if len(m.GetTenantId()) > 128 {
4817
		err := SchemaListRequestValidationError{
4818
			field:  "TenantId",
4819
			reason: "value length must be at most 128 bytes",
4820
		}
4821
		if !all {
4822
			return err
4823
		}
4824
		errors = append(errors, err)
4825
	}
4826
4827
	if !_SchemaListRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
4828
		err := SchemaListRequestValidationError{
4829
			field:  "TenantId",
4830
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
4831
		}
4832
		if !all {
4833
			return err
4834
		}
4835
		errors = append(errors, err)
4836
	}
4837
4838
	if m.GetPageSize() != 0 {
4839
4840
		if val := m.GetPageSize(); val < 1 || val > 100 {
4841
			err := SchemaListRequestValidationError{
4842
				field:  "PageSize",
4843
				reason: "value must be inside range [1, 100]",
4844
			}
4845
			if !all {
4846
				return err
4847
			}
4848
			errors = append(errors, err)
4849
		}
4850
4851
	}
4852
4853
	if m.GetContinuousToken() != "" {
4854
4855
	}
4856
4857
	if len(errors) > 0 {
4858
		return SchemaListRequestMultiError(errors)
4859
	}
4860
4861
	return nil
4862
}
4863
4864
// SchemaListRequestMultiError is an error wrapping multiple validation errors
4865
// returned by SchemaListRequest.ValidateAll() if the designated constraints
4866
// aren't met.
4867
type SchemaListRequestMultiError []error
4868
4869
// Error returns a concatenation of all the error messages it wraps.
4870
func (m SchemaListRequestMultiError) Error() string {
4871
	var msgs []string
4872
	for _, err := range m {
4873
		msgs = append(msgs, err.Error())
4874
	}
4875
	return strings.Join(msgs, "; ")
4876
}
4877
4878
// AllErrors returns a list of validation violation errors.
4879
func (m SchemaListRequestMultiError) AllErrors() []error { return m }
4880
4881
// SchemaListRequestValidationError is the validation error returned by
4882
// SchemaListRequest.Validate if the designated constraints aren't met.
4883
type SchemaListRequestValidationError struct {
4884
	field  string
4885
	reason string
4886
	cause  error
4887
	key    bool
4888
}
4889
4890
// Field function returns field value.
4891
func (e SchemaListRequestValidationError) Field() string { return e.field }
4892
4893
// Reason function returns reason value.
4894
func (e SchemaListRequestValidationError) Reason() string { return e.reason }
4895
4896
// Cause function returns cause value.
4897
func (e SchemaListRequestValidationError) Cause() error { return e.cause }
4898
4899
// Key function returns key value.
4900
func (e SchemaListRequestValidationError) Key() bool { return e.key }
4901
4902
// ErrorName returns error name.
4903
func (e SchemaListRequestValidationError) ErrorName() string {
4904
	return "SchemaListRequestValidationError"
4905
}
4906
4907
// Error satisfies the builtin error interface
4908
func (e SchemaListRequestValidationError) Error() string {
4909
	cause := ""
4910
	if e.cause != nil {
4911
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
4912
	}
4913
4914
	key := ""
4915
	if e.key {
4916
		key = "key for "
4917
	}
4918
4919
	return fmt.Sprintf(
4920
		"invalid %sSchemaListRequest.%s: %s%s",
4921
		key,
4922
		e.field,
4923
		e.reason,
4924
		cause)
4925
}
4926
4927
var _ error = SchemaListRequestValidationError{}
4928
4929
var _ interface {
4930
	Field() string
4931
	Reason() string
4932
	Key() bool
4933
	Cause() error
4934
	ErrorName() string
4935
} = SchemaListRequestValidationError{}
4936
4937
var _SchemaListRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
4938
4939
// Validate checks the field values on SchemaListResponse with the rules
4940
// defined in the proto definition for this message. If any rules are
4941
// violated, the first error encountered is returned, or nil if there are no violations.
4942
func (m *SchemaListResponse) Validate() error {
4943
	return m.validate(false)
4944
}
4945
4946
// ValidateAll checks the field values on SchemaListResponse with the rules
4947
// defined in the proto definition for this message. If any rules are
4948
// violated, the result is a list of violation errors wrapped in
4949
// SchemaListResponseMultiError, or nil if none found.
4950
func (m *SchemaListResponse) ValidateAll() error {
4951
	return m.validate(true)
4952
}
4953
4954
func (m *SchemaListResponse) validate(all bool) error {
4955
	if m == nil {
4956
		return nil
4957
	}
4958
4959
	var errors []error
4960
4961
	// no validation rules for Head
4962
4963
	for idx, item := range m.GetSchemas() {
4964
		_, _ = idx, item
4965
4966
		if all {
4967
			switch v := interface{}(item).(type) {
4968
			case interface{ ValidateAll() error }:
4969
				if err := v.ValidateAll(); err != nil {
4970
					errors = append(errors, SchemaListResponseValidationError{
4971
						field:  fmt.Sprintf("Schemas[%v]", idx),
4972
						reason: "embedded message failed validation",
4973
						cause:  err,
4974
					})
4975
				}
4976
			case interface{ Validate() error }:
4977
				if err := v.Validate(); err != nil {
4978
					errors = append(errors, SchemaListResponseValidationError{
4979
						field:  fmt.Sprintf("Schemas[%v]", idx),
4980
						reason: "embedded message failed validation",
4981
						cause:  err,
4982
					})
4983
				}
4984
			}
4985
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
4986
			if err := v.Validate(); err != nil {
4987
				return SchemaListResponseValidationError{
4988
					field:  fmt.Sprintf("Schemas[%v]", idx),
4989
					reason: "embedded message failed validation",
4990
					cause:  err,
4991
				}
4992
			}
4993
		}
4994
4995
	}
4996
4997
	// no validation rules for ContinuousToken
4998
4999
	if len(errors) > 0 {
5000
		return SchemaListResponseMultiError(errors)
5001
	}
5002
5003
	return nil
5004
}
5005
5006
// SchemaListResponseMultiError is an error wrapping multiple validation errors
5007
// returned by SchemaListResponse.ValidateAll() if the designated constraints
5008
// aren't met.
5009
type SchemaListResponseMultiError []error
5010
5011
// Error returns a concatenation of all the error messages it wraps.
5012
func (m SchemaListResponseMultiError) Error() string {
5013
	var msgs []string
5014
	for _, err := range m {
5015
		msgs = append(msgs, err.Error())
5016
	}
5017
	return strings.Join(msgs, "; ")
5018
}
5019
5020
// AllErrors returns a list of validation violation errors.
5021
func (m SchemaListResponseMultiError) AllErrors() []error { return m }
5022
5023
// SchemaListResponseValidationError is the validation error returned by
5024
// SchemaListResponse.Validate if the designated constraints aren't met.
5025
type SchemaListResponseValidationError struct {
5026
	field  string
5027
	reason string
5028
	cause  error
5029
	key    bool
5030
}
5031
5032
// Field function returns field value.
5033
func (e SchemaListResponseValidationError) Field() string { return e.field }
5034
5035
// Reason function returns reason value.
5036
func (e SchemaListResponseValidationError) Reason() string { return e.reason }
5037
5038
// Cause function returns cause value.
5039
func (e SchemaListResponseValidationError) Cause() error { return e.cause }
5040
5041
// Key function returns key value.
5042
func (e SchemaListResponseValidationError) Key() bool { return e.key }
5043
5044
// ErrorName returns error name.
5045
func (e SchemaListResponseValidationError) ErrorName() string {
5046
	return "SchemaListResponseValidationError"
5047
}
5048
5049
// Error satisfies the builtin error interface
5050
func (e SchemaListResponseValidationError) Error() string {
5051
	cause := ""
5052
	if e.cause != nil {
5053
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5054
	}
5055
5056
	key := ""
5057
	if e.key {
5058
		key = "key for "
5059
	}
5060
5061
	return fmt.Sprintf(
5062
		"invalid %sSchemaListResponse.%s: %s%s",
5063
		key,
5064
		e.field,
5065
		e.reason,
5066
		cause)
5067
}
5068
5069
var _ error = SchemaListResponseValidationError{}
5070
5071
var _ interface {
5072
	Field() string
5073
	Reason() string
5074
	Key() bool
5075
	Cause() error
5076
	ErrorName() string
5077
} = SchemaListResponseValidationError{}
5078
5079
// Validate checks the field values on SchemaList with the rules defined in the
5080
// proto definition for this message. If any rules are violated, the first
5081
// error encountered is returned, or nil if there are no violations.
5082
func (m *SchemaList) Validate() error {
5083
	return m.validate(false)
5084
}
5085
5086
// ValidateAll checks the field values on SchemaList with the rules defined in
5087
// the proto definition for this message. If any rules are violated, the
5088
// result is a list of violation errors wrapped in SchemaListMultiError, or
5089
// nil if none found.
5090
func (m *SchemaList) ValidateAll() error {
5091
	return m.validate(true)
5092
}
5093
5094
func (m *SchemaList) validate(all bool) error {
5095
	if m == nil {
5096
		return nil
5097
	}
5098
5099
	var errors []error
5100
5101
	// no validation rules for Version
5102
5103
	// no validation rules for CreatedAt
5104
5105
	if len(errors) > 0 {
5106
		return SchemaListMultiError(errors)
5107
	}
5108
5109
	return nil
5110
}
5111
5112
// SchemaListMultiError is an error wrapping multiple validation errors
5113
// returned by SchemaList.ValidateAll() if the designated constraints aren't met.
5114
type SchemaListMultiError []error
5115
5116
// Error returns a concatenation of all the error messages it wraps.
5117
func (m SchemaListMultiError) Error() string {
5118
	var msgs []string
5119
	for _, err := range m {
5120
		msgs = append(msgs, err.Error())
5121
	}
5122
	return strings.Join(msgs, "; ")
5123
}
5124
5125
// AllErrors returns a list of validation violation errors.
5126
func (m SchemaListMultiError) AllErrors() []error { return m }
5127
5128
// SchemaListValidationError is the validation error returned by
5129
// SchemaList.Validate if the designated constraints aren't met.
5130
type SchemaListValidationError struct {
5131
	field  string
5132
	reason string
5133
	cause  error
5134
	key    bool
5135
}
5136
5137
// Field function returns field value.
5138
func (e SchemaListValidationError) Field() string { return e.field }
5139
5140
// Reason function returns reason value.
5141
func (e SchemaListValidationError) Reason() string { return e.reason }
5142
5143
// Cause function returns cause value.
5144
func (e SchemaListValidationError) Cause() error { return e.cause }
5145
5146
// Key function returns key value.
5147
func (e SchemaListValidationError) Key() bool { return e.key }
5148
5149
// ErrorName returns error name.
5150
func (e SchemaListValidationError) ErrorName() string { return "SchemaListValidationError" }
5151
5152
// Error satisfies the builtin error interface
5153
func (e SchemaListValidationError) Error() string {
5154
	cause := ""
5155
	if e.cause != nil {
5156
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5157
	}
5158
5159
	key := ""
5160
	if e.key {
5161
		key = "key for "
5162
	}
5163
5164
	return fmt.Sprintf(
5165
		"invalid %sSchemaList.%s: %s%s",
5166
		key,
5167
		e.field,
5168
		e.reason,
5169
		cause)
5170
}
5171
5172
var _ error = SchemaListValidationError{}
5173
5174
var _ interface {
5175
	Field() string
5176
	Reason() string
5177
	Key() bool
5178
	Cause() error
5179
	ErrorName() string
5180
} = SchemaListValidationError{}
5181
5182
// Validate checks the field values on DataWriteRequest with the rules defined
5183
// in the proto definition for this message. If any rules are violated, the
5184
// first error encountered is returned, or nil if there are no violations.
5185
func (m *DataWriteRequest) Validate() error {
5186
	return m.validate(false)
5187
}
5188
5189
// ValidateAll checks the field values on DataWriteRequest with the rules
5190
// defined in the proto definition for this message. If any rules are
5191
// violated, the result is a list of violation errors wrapped in
5192
// DataWriteRequestMultiError, or nil if none found.
5193
func (m *DataWriteRequest) ValidateAll() error {
5194
	return m.validate(true)
5195
}
5196
5197
func (m *DataWriteRequest) validate(all bool) error {
5198
	if m == nil {
5199
		return nil
5200
	}
5201
5202
	var errors []error
5203
5204
	if len(m.GetTenantId()) > 128 {
5205
		err := DataWriteRequestValidationError{
5206
			field:  "TenantId",
5207
			reason: "value length must be at most 128 bytes",
5208
		}
5209
		if !all {
5210
			return err
5211
		}
5212
		errors = append(errors, err)
5213
	}
5214
5215
	if !_DataWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
5216
		err := DataWriteRequestValidationError{
5217
			field:  "TenantId",
5218
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
5219
		}
5220
		if !all {
5221
			return err
5222
		}
5223
		errors = append(errors, err)
5224
	}
5225
5226
	if m.GetMetadata() == nil {
5227
		err := DataWriteRequestValidationError{
5228
			field:  "Metadata",
5229
			reason: "value is required",
5230
		}
5231
		if !all {
5232
			return err
5233
		}
5234
		errors = append(errors, err)
5235
	}
5236
5237
	if all {
5238
		switch v := interface{}(m.GetMetadata()).(type) {
5239
		case interface{ ValidateAll() error }:
5240
			if err := v.ValidateAll(); err != nil {
5241
				errors = append(errors, DataWriteRequestValidationError{
5242
					field:  "Metadata",
5243
					reason: "embedded message failed validation",
5244
					cause:  err,
5245
				})
5246
			}
5247
		case interface{ Validate() error }:
5248
			if err := v.Validate(); err != nil {
5249
				errors = append(errors, DataWriteRequestValidationError{
5250
					field:  "Metadata",
5251
					reason: "embedded message failed validation",
5252
					cause:  err,
5253
				})
5254
			}
5255
		}
5256
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
5257
		if err := v.Validate(); err != nil {
5258
			return DataWriteRequestValidationError{
5259
				field:  "Metadata",
5260
				reason: "embedded message failed validation",
5261
				cause:  err,
5262
			}
5263
		}
5264
	}
5265
5266
	if len(m.GetTuples()) > 100 {
5267
		err := DataWriteRequestValidationError{
5268
			field:  "Tuples",
5269
			reason: "value must contain no more than 100 item(s)",
5270
		}
5271
		if !all {
5272
			return err
5273
		}
5274
		errors = append(errors, err)
5275
	}
5276
5277
	for idx, item := range m.GetTuples() {
5278
		_, _ = idx, item
5279
5280
		if item == nil {
5281
			err := DataWriteRequestValidationError{
5282
				field:  fmt.Sprintf("Tuples[%v]", idx),
5283
				reason: "value is required",
5284
			}
5285
			if !all {
5286
				return err
5287
			}
5288
			errors = append(errors, err)
5289
		}
5290
5291
		if all {
5292
			switch v := interface{}(item).(type) {
5293
			case interface{ ValidateAll() error }:
5294
				if err := v.ValidateAll(); err != nil {
5295
					errors = append(errors, DataWriteRequestValidationError{
5296
						field:  fmt.Sprintf("Tuples[%v]", idx),
5297
						reason: "embedded message failed validation",
5298
						cause:  err,
5299
					})
5300
				}
5301
			case interface{ Validate() error }:
5302
				if err := v.Validate(); err != nil {
5303
					errors = append(errors, DataWriteRequestValidationError{
5304
						field:  fmt.Sprintf("Tuples[%v]", idx),
5305
						reason: "embedded message failed validation",
5306
						cause:  err,
5307
					})
5308
				}
5309
			}
5310
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
5311
			if err := v.Validate(); err != nil {
5312
				return DataWriteRequestValidationError{
5313
					field:  fmt.Sprintf("Tuples[%v]", idx),
5314
					reason: "embedded message failed validation",
5315
					cause:  err,
5316
				}
5317
			}
5318
		}
5319
5320
	}
5321
5322
	if len(m.GetAttributes()) > 100 {
5323
		err := DataWriteRequestValidationError{
5324
			field:  "Attributes",
5325
			reason: "value must contain no more than 100 item(s)",
5326
		}
5327
		if !all {
5328
			return err
5329
		}
5330
		errors = append(errors, err)
5331
	}
5332
5333
	for idx, item := range m.GetAttributes() {
5334
		_, _ = idx, item
5335
5336
		if item == nil {
5337
			err := DataWriteRequestValidationError{
5338
				field:  fmt.Sprintf("Attributes[%v]", idx),
5339
				reason: "value is required",
5340
			}
5341
			if !all {
5342
				return err
5343
			}
5344
			errors = append(errors, err)
5345
		}
5346
5347
		if all {
5348
			switch v := interface{}(item).(type) {
5349
			case interface{ ValidateAll() error }:
5350
				if err := v.ValidateAll(); err != nil {
5351
					errors = append(errors, DataWriteRequestValidationError{
5352
						field:  fmt.Sprintf("Attributes[%v]", idx),
5353
						reason: "embedded message failed validation",
5354
						cause:  err,
5355
					})
5356
				}
5357
			case interface{ Validate() error }:
5358
				if err := v.Validate(); err != nil {
5359
					errors = append(errors, DataWriteRequestValidationError{
5360
						field:  fmt.Sprintf("Attributes[%v]", idx),
5361
						reason: "embedded message failed validation",
5362
						cause:  err,
5363
					})
5364
				}
5365
			}
5366
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
5367
			if err := v.Validate(); err != nil {
5368
				return DataWriteRequestValidationError{
5369
					field:  fmt.Sprintf("Attributes[%v]", idx),
5370
					reason: "embedded message failed validation",
5371
					cause:  err,
5372
				}
5373
			}
5374
		}
5375
5376
	}
5377
5378
	if len(errors) > 0 {
5379
		return DataWriteRequestMultiError(errors)
5380
	}
5381
5382
	return nil
5383
}
5384
5385
// DataWriteRequestMultiError is an error wrapping multiple validation errors
5386
// returned by DataWriteRequest.ValidateAll() if the designated constraints
5387
// aren't met.
5388
type DataWriteRequestMultiError []error
5389
5390
// Error returns a concatenation of all the error messages it wraps.
5391
func (m DataWriteRequestMultiError) Error() string {
5392
	var msgs []string
5393
	for _, err := range m {
5394
		msgs = append(msgs, err.Error())
5395
	}
5396
	return strings.Join(msgs, "; ")
5397
}
5398
5399
// AllErrors returns a list of validation violation errors.
5400
func (m DataWriteRequestMultiError) AllErrors() []error { return m }
5401
5402
// DataWriteRequestValidationError is the validation error returned by
5403
// DataWriteRequest.Validate if the designated constraints aren't met.
5404
type DataWriteRequestValidationError struct {
5405
	field  string
5406
	reason string
5407
	cause  error
5408
	key    bool
5409
}
5410
5411
// Field function returns field value.
5412
func (e DataWriteRequestValidationError) Field() string { return e.field }
5413
5414
// Reason function returns reason value.
5415
func (e DataWriteRequestValidationError) Reason() string { return e.reason }
5416
5417
// Cause function returns cause value.
5418
func (e DataWriteRequestValidationError) Cause() error { return e.cause }
5419
5420
// Key function returns key value.
5421
func (e DataWriteRequestValidationError) Key() bool { return e.key }
5422
5423
// ErrorName returns error name.
5424
func (e DataWriteRequestValidationError) ErrorName() string { return "DataWriteRequestValidationError" }
5425
5426
// Error satisfies the builtin error interface
5427
func (e DataWriteRequestValidationError) Error() string {
5428
	cause := ""
5429
	if e.cause != nil {
5430
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5431
	}
5432
5433
	key := ""
5434
	if e.key {
5435
		key = "key for "
5436
	}
5437
5438
	return fmt.Sprintf(
5439
		"invalid %sDataWriteRequest.%s: %s%s",
5440
		key,
5441
		e.field,
5442
		e.reason,
5443
		cause)
5444
}
5445
5446
var _ error = DataWriteRequestValidationError{}
5447
5448
var _ interface {
5449
	Field() string
5450
	Reason() string
5451
	Key() bool
5452
	Cause() error
5453
	ErrorName() string
5454
} = DataWriteRequestValidationError{}
5455
5456
var _DataWriteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
5457
5458
// Validate checks the field values on DataWriteRequestMetadata with the rules
5459
// defined in the proto definition for this message. If any rules are
5460
// violated, the first error encountered is returned, or nil if there are no violations.
5461
func (m *DataWriteRequestMetadata) Validate() error {
5462
	return m.validate(false)
5463
}
5464
5465
// ValidateAll checks the field values on DataWriteRequestMetadata with the
5466
// rules defined in the proto definition for this message. If any rules are
5467
// violated, the result is a list of violation errors wrapped in
5468
// DataWriteRequestMetadataMultiError, or nil if none found.
5469
func (m *DataWriteRequestMetadata) ValidateAll() error {
5470
	return m.validate(true)
5471
}
5472
5473
func (m *DataWriteRequestMetadata) validate(all bool) error {
5474
	if m == nil {
5475
		return nil
5476
	}
5477
5478
	var errors []error
5479
5480
	// no validation rules for SchemaVersion
5481
5482
	if len(errors) > 0 {
5483
		return DataWriteRequestMetadataMultiError(errors)
5484
	}
5485
5486
	return nil
5487
}
5488
5489
// DataWriteRequestMetadataMultiError is an error wrapping multiple validation
5490
// errors returned by DataWriteRequestMetadata.ValidateAll() if the designated
5491
// constraints aren't met.
5492
type DataWriteRequestMetadataMultiError []error
5493
5494
// Error returns a concatenation of all the error messages it wraps.
5495
func (m DataWriteRequestMetadataMultiError) Error() string {
5496
	var msgs []string
5497
	for _, err := range m {
5498
		msgs = append(msgs, err.Error())
5499
	}
5500
	return strings.Join(msgs, "; ")
5501
}
5502
5503
// AllErrors returns a list of validation violation errors.
5504
func (m DataWriteRequestMetadataMultiError) AllErrors() []error { return m }
5505
5506
// DataWriteRequestMetadataValidationError is the validation error returned by
5507
// DataWriteRequestMetadata.Validate if the designated constraints aren't met.
5508
type DataWriteRequestMetadataValidationError struct {
5509
	field  string
5510
	reason string
5511
	cause  error
5512
	key    bool
5513
}
5514
5515
// Field function returns field value.
5516
func (e DataWriteRequestMetadataValidationError) Field() string { return e.field }
5517
5518
// Reason function returns reason value.
5519
func (e DataWriteRequestMetadataValidationError) Reason() string { return e.reason }
5520
5521
// Cause function returns cause value.
5522
func (e DataWriteRequestMetadataValidationError) Cause() error { return e.cause }
5523
5524
// Key function returns key value.
5525
func (e DataWriteRequestMetadataValidationError) Key() bool { return e.key }
5526
5527
// ErrorName returns error name.
5528
func (e DataWriteRequestMetadataValidationError) ErrorName() string {
5529
	return "DataWriteRequestMetadataValidationError"
5530
}
5531
5532
// Error satisfies the builtin error interface
5533
func (e DataWriteRequestMetadataValidationError) Error() string {
5534
	cause := ""
5535
	if e.cause != nil {
5536
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5537
	}
5538
5539
	key := ""
5540
	if e.key {
5541
		key = "key for "
5542
	}
5543
5544
	return fmt.Sprintf(
5545
		"invalid %sDataWriteRequestMetadata.%s: %s%s",
5546
		key,
5547
		e.field,
5548
		e.reason,
5549
		cause)
5550
}
5551
5552
var _ error = DataWriteRequestMetadataValidationError{}
5553
5554
var _ interface {
5555
	Field() string
5556
	Reason() string
5557
	Key() bool
5558
	Cause() error
5559
	ErrorName() string
5560
} = DataWriteRequestMetadataValidationError{}
5561
5562
// Validate checks the field values on DataWriteResponse with the rules defined
5563
// in the proto definition for this message. If any rules are violated, the
5564
// first error encountered is returned, or nil if there are no violations.
5565
func (m *DataWriteResponse) Validate() error {
5566
	return m.validate(false)
5567
}
5568
5569
// ValidateAll checks the field values on DataWriteResponse with the rules
5570
// defined in the proto definition for this message. If any rules are
5571
// violated, the result is a list of violation errors wrapped in
5572
// DataWriteResponseMultiError, or nil if none found.
5573
func (m *DataWriteResponse) ValidateAll() error {
5574
	return m.validate(true)
5575
}
5576
5577
func (m *DataWriteResponse) validate(all bool) error {
5578
	if m == nil {
5579
		return nil
5580
	}
5581
5582
	var errors []error
5583
5584
	// no validation rules for SnapToken
5585
5586
	if len(errors) > 0 {
5587
		return DataWriteResponseMultiError(errors)
5588
	}
5589
5590
	return nil
5591
}
5592
5593
// DataWriteResponseMultiError is an error wrapping multiple validation errors
5594
// returned by DataWriteResponse.ValidateAll() if the designated constraints
5595
// aren't met.
5596
type DataWriteResponseMultiError []error
5597
5598
// Error returns a concatenation of all the error messages it wraps.
5599
func (m DataWriteResponseMultiError) Error() string {
5600
	var msgs []string
5601
	for _, err := range m {
5602
		msgs = append(msgs, err.Error())
5603
	}
5604
	return strings.Join(msgs, "; ")
5605
}
5606
5607
// AllErrors returns a list of validation violation errors.
5608
func (m DataWriteResponseMultiError) AllErrors() []error { return m }
5609
5610
// DataWriteResponseValidationError is the validation error returned by
5611
// DataWriteResponse.Validate if the designated constraints aren't met.
5612
type DataWriteResponseValidationError struct {
5613
	field  string
5614
	reason string
5615
	cause  error
5616
	key    bool
5617
}
5618
5619
// Field function returns field value.
5620
func (e DataWriteResponseValidationError) Field() string { return e.field }
5621
5622
// Reason function returns reason value.
5623
func (e DataWriteResponseValidationError) Reason() string { return e.reason }
5624
5625
// Cause function returns cause value.
5626
func (e DataWriteResponseValidationError) Cause() error { return e.cause }
5627
5628
// Key function returns key value.
5629
func (e DataWriteResponseValidationError) Key() bool { return e.key }
5630
5631
// ErrorName returns error name.
5632
func (e DataWriteResponseValidationError) ErrorName() string {
5633
	return "DataWriteResponseValidationError"
5634
}
5635
5636
// Error satisfies the builtin error interface
5637
func (e DataWriteResponseValidationError) Error() string {
5638
	cause := ""
5639
	if e.cause != nil {
5640
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5641
	}
5642
5643
	key := ""
5644
	if e.key {
5645
		key = "key for "
5646
	}
5647
5648
	return fmt.Sprintf(
5649
		"invalid %sDataWriteResponse.%s: %s%s",
5650
		key,
5651
		e.field,
5652
		e.reason,
5653
		cause)
5654
}
5655
5656
var _ error = DataWriteResponseValidationError{}
5657
5658
var _ interface {
5659
	Field() string
5660
	Reason() string
5661
	Key() bool
5662
	Cause() error
5663
	ErrorName() string
5664
} = DataWriteResponseValidationError{}
5665
5666
// Validate checks the field values on RelationshipWriteRequest with the rules
5667
// defined in the proto definition for this message. If any rules are
5668
// violated, the first error encountered is returned, or nil if there are no violations.
5669
func (m *RelationshipWriteRequest) Validate() error {
5670
	return m.validate(false)
5671
}
5672
5673
// ValidateAll checks the field values on RelationshipWriteRequest with the
5674
// rules defined in the proto definition for this message. If any rules are
5675
// violated, the result is a list of violation errors wrapped in
5676
// RelationshipWriteRequestMultiError, or nil if none found.
5677
func (m *RelationshipWriteRequest) ValidateAll() error {
5678
	return m.validate(true)
5679
}
5680
5681
func (m *RelationshipWriteRequest) validate(all bool) error {
5682
	if m == nil {
5683
		return nil
5684
	}
5685
5686
	var errors []error
5687
5688
	if len(m.GetTenantId()) > 128 {
5689
		err := RelationshipWriteRequestValidationError{
5690
			field:  "TenantId",
5691
			reason: "value length must be at most 128 bytes",
5692
		}
5693
		if !all {
5694
			return err
5695
		}
5696
		errors = append(errors, err)
5697
	}
5698
5699
	if !_RelationshipWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
5700
		err := RelationshipWriteRequestValidationError{
5701
			field:  "TenantId",
5702
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
5703
		}
5704
		if !all {
5705
			return err
5706
		}
5707
		errors = append(errors, err)
5708
	}
5709
5710
	if m.GetMetadata() == nil {
5711
		err := RelationshipWriteRequestValidationError{
5712
			field:  "Metadata",
5713
			reason: "value is required",
5714
		}
5715
		if !all {
5716
			return err
5717
		}
5718
		errors = append(errors, err)
5719
	}
5720
5721
	if all {
5722
		switch v := interface{}(m.GetMetadata()).(type) {
5723
		case interface{ ValidateAll() error }:
5724
			if err := v.ValidateAll(); err != nil {
5725
				errors = append(errors, RelationshipWriteRequestValidationError{
5726
					field:  "Metadata",
5727
					reason: "embedded message failed validation",
5728
					cause:  err,
5729
				})
5730
			}
5731
		case interface{ Validate() error }:
5732
			if err := v.Validate(); err != nil {
5733
				errors = append(errors, RelationshipWriteRequestValidationError{
5734
					field:  "Metadata",
5735
					reason: "embedded message failed validation",
5736
					cause:  err,
5737
				})
5738
			}
5739
		}
5740
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
5741
		if err := v.Validate(); err != nil {
5742
			return RelationshipWriteRequestValidationError{
5743
				field:  "Metadata",
5744
				reason: "embedded message failed validation",
5745
				cause:  err,
5746
			}
5747
		}
5748
	}
5749
5750
	if l := len(m.GetTuples()); l < 1 || l > 100 {
5751
		err := RelationshipWriteRequestValidationError{
5752
			field:  "Tuples",
5753
			reason: "value must contain between 1 and 100 items, inclusive",
5754
		}
5755
		if !all {
5756
			return err
5757
		}
5758
		errors = append(errors, err)
5759
	}
5760
5761
	for idx, item := range m.GetTuples() {
5762
		_, _ = idx, item
5763
5764
		if item == nil {
5765
			err := RelationshipWriteRequestValidationError{
5766
				field:  fmt.Sprintf("Tuples[%v]", idx),
5767
				reason: "value is required",
5768
			}
5769
			if !all {
5770
				return err
5771
			}
5772
			errors = append(errors, err)
5773
		}
5774
5775
		if all {
5776
			switch v := interface{}(item).(type) {
5777
			case interface{ ValidateAll() error }:
5778
				if err := v.ValidateAll(); err != nil {
5779
					errors = append(errors, RelationshipWriteRequestValidationError{
5780
						field:  fmt.Sprintf("Tuples[%v]", idx),
5781
						reason: "embedded message failed validation",
5782
						cause:  err,
5783
					})
5784
				}
5785
			case interface{ Validate() error }:
5786
				if err := v.Validate(); err != nil {
5787
					errors = append(errors, RelationshipWriteRequestValidationError{
5788
						field:  fmt.Sprintf("Tuples[%v]", idx),
5789
						reason: "embedded message failed validation",
5790
						cause:  err,
5791
					})
5792
				}
5793
			}
5794
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
5795
			if err := v.Validate(); err != nil {
5796
				return RelationshipWriteRequestValidationError{
5797
					field:  fmt.Sprintf("Tuples[%v]", idx),
5798
					reason: "embedded message failed validation",
5799
					cause:  err,
5800
				}
5801
			}
5802
		}
5803
5804
	}
5805
5806
	if len(errors) > 0 {
5807
		return RelationshipWriteRequestMultiError(errors)
5808
	}
5809
5810
	return nil
5811
}
5812
5813
// RelationshipWriteRequestMultiError is an error wrapping multiple validation
5814
// errors returned by RelationshipWriteRequest.ValidateAll() if the designated
5815
// constraints aren't met.
5816
type RelationshipWriteRequestMultiError []error
5817
5818
// Error returns a concatenation of all the error messages it wraps.
5819
func (m RelationshipWriteRequestMultiError) Error() string {
5820
	var msgs []string
5821
	for _, err := range m {
5822
		msgs = append(msgs, err.Error())
5823
	}
5824
	return strings.Join(msgs, "; ")
5825
}
5826
5827
// AllErrors returns a list of validation violation errors.
5828
func (m RelationshipWriteRequestMultiError) AllErrors() []error { return m }
5829
5830
// RelationshipWriteRequestValidationError is the validation error returned by
5831
// RelationshipWriteRequest.Validate if the designated constraints aren't met.
5832
type RelationshipWriteRequestValidationError struct {
5833
	field  string
5834
	reason string
5835
	cause  error
5836
	key    bool
5837
}
5838
5839
// Field function returns field value.
5840
func (e RelationshipWriteRequestValidationError) Field() string { return e.field }
5841
5842
// Reason function returns reason value.
5843
func (e RelationshipWriteRequestValidationError) Reason() string { return e.reason }
5844
5845
// Cause function returns cause value.
5846
func (e RelationshipWriteRequestValidationError) Cause() error { return e.cause }
5847
5848
// Key function returns key value.
5849
func (e RelationshipWriteRequestValidationError) Key() bool { return e.key }
5850
5851
// ErrorName returns error name.
5852
func (e RelationshipWriteRequestValidationError) ErrorName() string {
5853
	return "RelationshipWriteRequestValidationError"
5854
}
5855
5856
// Error satisfies the builtin error interface
5857
func (e RelationshipWriteRequestValidationError) Error() string {
5858
	cause := ""
5859
	if e.cause != nil {
5860
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5861
	}
5862
5863
	key := ""
5864
	if e.key {
5865
		key = "key for "
5866
	}
5867
5868
	return fmt.Sprintf(
5869
		"invalid %sRelationshipWriteRequest.%s: %s%s",
5870
		key,
5871
		e.field,
5872
		e.reason,
5873
		cause)
5874
}
5875
5876
var _ error = RelationshipWriteRequestValidationError{}
5877
5878
var _ interface {
5879
	Field() string
5880
	Reason() string
5881
	Key() bool
5882
	Cause() error
5883
	ErrorName() string
5884
} = RelationshipWriteRequestValidationError{}
5885
5886
var _RelationshipWriteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
5887
5888
// Validate checks the field values on RelationshipWriteRequestMetadata with
5889
// the rules defined in the proto definition for this message. If any rules
5890
// are violated, the first error encountered is returned, or nil if there are
5891
// no violations.
5892
func (m *RelationshipWriteRequestMetadata) Validate() error {
5893
	return m.validate(false)
5894
}
5895
5896
// ValidateAll checks the field values on RelationshipWriteRequestMetadata with
5897
// the rules defined in the proto definition for this message. If any rules
5898
// are violated, the result is a list of violation errors wrapped in
5899
// RelationshipWriteRequestMetadataMultiError, or nil if none found.
5900
func (m *RelationshipWriteRequestMetadata) ValidateAll() error {
5901
	return m.validate(true)
5902
}
5903
5904
func (m *RelationshipWriteRequestMetadata) validate(all bool) error {
5905
	if m == nil {
5906
		return nil
5907
	}
5908
5909
	var errors []error
5910
5911
	// no validation rules for SchemaVersion
5912
5913
	if len(errors) > 0 {
5914
		return RelationshipWriteRequestMetadataMultiError(errors)
5915
	}
5916
5917
	return nil
5918
}
5919
5920
// RelationshipWriteRequestMetadataMultiError is an error wrapping multiple
5921
// validation errors returned by
5922
// RelationshipWriteRequestMetadata.ValidateAll() if the designated
5923
// constraints aren't met.
5924
type RelationshipWriteRequestMetadataMultiError []error
5925
5926
// Error returns a concatenation of all the error messages it wraps.
5927
func (m RelationshipWriteRequestMetadataMultiError) Error() string {
5928
	var msgs []string
5929
	for _, err := range m {
5930
		msgs = append(msgs, err.Error())
5931
	}
5932
	return strings.Join(msgs, "; ")
5933
}
5934
5935
// AllErrors returns a list of validation violation errors.
5936
func (m RelationshipWriteRequestMetadataMultiError) AllErrors() []error { return m }
5937
5938
// RelationshipWriteRequestMetadataValidationError is the validation error
5939
// returned by RelationshipWriteRequestMetadata.Validate if the designated
5940
// constraints aren't met.
5941
type RelationshipWriteRequestMetadataValidationError struct {
5942
	field  string
5943
	reason string
5944
	cause  error
5945
	key    bool
5946
}
5947
5948
// Field function returns field value.
5949
func (e RelationshipWriteRequestMetadataValidationError) Field() string { return e.field }
5950
5951
// Reason function returns reason value.
5952
func (e RelationshipWriteRequestMetadataValidationError) Reason() string { return e.reason }
5953
5954
// Cause function returns cause value.
5955
func (e RelationshipWriteRequestMetadataValidationError) Cause() error { return e.cause }
5956
5957
// Key function returns key value.
5958
func (e RelationshipWriteRequestMetadataValidationError) Key() bool { return e.key }
5959
5960
// ErrorName returns error name.
5961
func (e RelationshipWriteRequestMetadataValidationError) ErrorName() string {
5962
	return "RelationshipWriteRequestMetadataValidationError"
5963
}
5964
5965
// Error satisfies the builtin error interface
5966
func (e RelationshipWriteRequestMetadataValidationError) Error() string {
5967
	cause := ""
5968
	if e.cause != nil {
5969
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
5970
	}
5971
5972
	key := ""
5973
	if e.key {
5974
		key = "key for "
5975
	}
5976
5977
	return fmt.Sprintf(
5978
		"invalid %sRelationshipWriteRequestMetadata.%s: %s%s",
5979
		key,
5980
		e.field,
5981
		e.reason,
5982
		cause)
5983
}
5984
5985
var _ error = RelationshipWriteRequestMetadataValidationError{}
5986
5987
var _ interface {
5988
	Field() string
5989
	Reason() string
5990
	Key() bool
5991
	Cause() error
5992
	ErrorName() string
5993
} = RelationshipWriteRequestMetadataValidationError{}
5994
5995
// Validate checks the field values on RelationshipWriteResponse with the rules
5996
// defined in the proto definition for this message. If any rules are
5997
// violated, the first error encountered is returned, or nil if there are no violations.
5998
func (m *RelationshipWriteResponse) Validate() error {
5999
	return m.validate(false)
6000
}
6001
6002
// ValidateAll checks the field values on RelationshipWriteResponse with the
6003
// rules defined in the proto definition for this message. If any rules are
6004
// violated, the result is a list of violation errors wrapped in
6005
// RelationshipWriteResponseMultiError, or nil if none found.
6006
func (m *RelationshipWriteResponse) ValidateAll() error {
6007
	return m.validate(true)
6008
}
6009
6010
func (m *RelationshipWriteResponse) validate(all bool) error {
6011
	if m == nil {
6012
		return nil
6013
	}
6014
6015
	var errors []error
6016
6017
	// no validation rules for SnapToken
6018
6019
	if len(errors) > 0 {
6020
		return RelationshipWriteResponseMultiError(errors)
6021
	}
6022
6023
	return nil
6024
}
6025
6026
// RelationshipWriteResponseMultiError is an error wrapping multiple validation
6027
// errors returned by RelationshipWriteResponse.ValidateAll() if the
6028
// designated constraints aren't met.
6029
type RelationshipWriteResponseMultiError []error
6030
6031
// Error returns a concatenation of all the error messages it wraps.
6032
func (m RelationshipWriteResponseMultiError) Error() string {
6033
	var msgs []string
6034
	for _, err := range m {
6035
		msgs = append(msgs, err.Error())
6036
	}
6037
	return strings.Join(msgs, "; ")
6038
}
6039
6040
// AllErrors returns a list of validation violation errors.
6041
func (m RelationshipWriteResponseMultiError) AllErrors() []error { return m }
6042
6043
// RelationshipWriteResponseValidationError is the validation error returned by
6044
// RelationshipWriteResponse.Validate if the designated constraints aren't met.
6045
type RelationshipWriteResponseValidationError struct {
6046
	field  string
6047
	reason string
6048
	cause  error
6049
	key    bool
6050
}
6051
6052
// Field function returns field value.
6053
func (e RelationshipWriteResponseValidationError) Field() string { return e.field }
6054
6055
// Reason function returns reason value.
6056
func (e RelationshipWriteResponseValidationError) Reason() string { return e.reason }
6057
6058
// Cause function returns cause value.
6059
func (e RelationshipWriteResponseValidationError) Cause() error { return e.cause }
6060
6061
// Key function returns key value.
6062
func (e RelationshipWriteResponseValidationError) Key() bool { return e.key }
6063
6064
// ErrorName returns error name.
6065
func (e RelationshipWriteResponseValidationError) ErrorName() string {
6066
	return "RelationshipWriteResponseValidationError"
6067
}
6068
6069
// Error satisfies the builtin error interface
6070
func (e RelationshipWriteResponseValidationError) Error() string {
6071
	cause := ""
6072
	if e.cause != nil {
6073
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6074
	}
6075
6076
	key := ""
6077
	if e.key {
6078
		key = "key for "
6079
	}
6080
6081
	return fmt.Sprintf(
6082
		"invalid %sRelationshipWriteResponse.%s: %s%s",
6083
		key,
6084
		e.field,
6085
		e.reason,
6086
		cause)
6087
}
6088
6089
var _ error = RelationshipWriteResponseValidationError{}
6090
6091
var _ interface {
6092
	Field() string
6093
	Reason() string
6094
	Key() bool
6095
	Cause() error
6096
	ErrorName() string
6097
} = RelationshipWriteResponseValidationError{}
6098
6099
// Validate checks the field values on RelationshipReadRequest with the rules
6100
// defined in the proto definition for this message. If any rules are
6101
// violated, the first error encountered is returned, or nil if there are no violations.
6102
func (m *RelationshipReadRequest) Validate() error {
6103
	return m.validate(false)
6104
}
6105
6106
// ValidateAll checks the field values on RelationshipReadRequest with the
6107
// rules defined in the proto definition for this message. If any rules are
6108
// violated, the result is a list of violation errors wrapped in
6109
// RelationshipReadRequestMultiError, or nil if none found.
6110
func (m *RelationshipReadRequest) ValidateAll() error {
6111
	return m.validate(true)
6112
}
6113
6114
func (m *RelationshipReadRequest) validate(all bool) error {
6115
	if m == nil {
6116
		return nil
6117
	}
6118
6119
	var errors []error
6120
6121
	if len(m.GetTenantId()) > 128 {
6122
		err := RelationshipReadRequestValidationError{
6123
			field:  "TenantId",
6124
			reason: "value length must be at most 128 bytes",
6125
		}
6126
		if !all {
6127
			return err
6128
		}
6129
		errors = append(errors, err)
6130
	}
6131
6132
	if !_RelationshipReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
6133
		err := RelationshipReadRequestValidationError{
6134
			field:  "TenantId",
6135
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
6136
		}
6137
		if !all {
6138
			return err
6139
		}
6140
		errors = append(errors, err)
6141
	}
6142
6143
	if m.GetMetadata() == nil {
6144
		err := RelationshipReadRequestValidationError{
6145
			field:  "Metadata",
6146
			reason: "value is required",
6147
		}
6148
		if !all {
6149
			return err
6150
		}
6151
		errors = append(errors, err)
6152
	}
6153
6154
	if all {
6155
		switch v := interface{}(m.GetMetadata()).(type) {
6156
		case interface{ ValidateAll() error }:
6157
			if err := v.ValidateAll(); err != nil {
6158
				errors = append(errors, RelationshipReadRequestValidationError{
6159
					field:  "Metadata",
6160
					reason: "embedded message failed validation",
6161
					cause:  err,
6162
				})
6163
			}
6164
		case interface{ Validate() error }:
6165
			if err := v.Validate(); err != nil {
6166
				errors = append(errors, RelationshipReadRequestValidationError{
6167
					field:  "Metadata",
6168
					reason: "embedded message failed validation",
6169
					cause:  err,
6170
				})
6171
			}
6172
		}
6173
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
6174
		if err := v.Validate(); err != nil {
6175
			return RelationshipReadRequestValidationError{
6176
				field:  "Metadata",
6177
				reason: "embedded message failed validation",
6178
				cause:  err,
6179
			}
6180
		}
6181
	}
6182
6183
	if m.GetFilter() == nil {
6184
		err := RelationshipReadRequestValidationError{
6185
			field:  "Filter",
6186
			reason: "value is required",
6187
		}
6188
		if !all {
6189
			return err
6190
		}
6191
		errors = append(errors, err)
6192
	}
6193
6194
	if all {
6195
		switch v := interface{}(m.GetFilter()).(type) {
6196
		case interface{ ValidateAll() error }:
6197
			if err := v.ValidateAll(); err != nil {
6198
				errors = append(errors, RelationshipReadRequestValidationError{
6199
					field:  "Filter",
6200
					reason: "embedded message failed validation",
6201
					cause:  err,
6202
				})
6203
			}
6204
		case interface{ Validate() error }:
6205
			if err := v.Validate(); err != nil {
6206
				errors = append(errors, RelationshipReadRequestValidationError{
6207
					field:  "Filter",
6208
					reason: "embedded message failed validation",
6209
					cause:  err,
6210
				})
6211
			}
6212
		}
6213
	} else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok {
6214
		if err := v.Validate(); err != nil {
6215
			return RelationshipReadRequestValidationError{
6216
				field:  "Filter",
6217
				reason: "embedded message failed validation",
6218
				cause:  err,
6219
			}
6220
		}
6221
	}
6222
6223
	if m.GetPageSize() != 0 {
6224
6225
		if val := m.GetPageSize(); val < 1 || val > 100 {
6226
			err := RelationshipReadRequestValidationError{
6227
				field:  "PageSize",
6228
				reason: "value must be inside range [1, 100]",
6229
			}
6230
			if !all {
6231
				return err
6232
			}
6233
			errors = append(errors, err)
6234
		}
6235
6236
	}
6237
6238
	if m.GetContinuousToken() != "" {
6239
6240
	}
6241
6242
	if len(errors) > 0 {
6243
		return RelationshipReadRequestMultiError(errors)
6244
	}
6245
6246
	return nil
6247
}
6248
6249
// RelationshipReadRequestMultiError is an error wrapping multiple validation
6250
// errors returned by RelationshipReadRequest.ValidateAll() if the designated
6251
// constraints aren't met.
6252
type RelationshipReadRequestMultiError []error
6253
6254
// Error returns a concatenation of all the error messages it wraps.
6255
func (m RelationshipReadRequestMultiError) Error() string {
6256
	var msgs []string
6257
	for _, err := range m {
6258
		msgs = append(msgs, err.Error())
6259
	}
6260
	return strings.Join(msgs, "; ")
6261
}
6262
6263
// AllErrors returns a list of validation violation errors.
6264
func (m RelationshipReadRequestMultiError) AllErrors() []error { return m }
6265
6266
// RelationshipReadRequestValidationError is the validation error returned by
6267
// RelationshipReadRequest.Validate if the designated constraints aren't met.
6268
type RelationshipReadRequestValidationError struct {
6269
	field  string
6270
	reason string
6271
	cause  error
6272
	key    bool
6273
}
6274
6275
// Field function returns field value.
6276
func (e RelationshipReadRequestValidationError) Field() string { return e.field }
6277
6278
// Reason function returns reason value.
6279
func (e RelationshipReadRequestValidationError) Reason() string { return e.reason }
6280
6281
// Cause function returns cause value.
6282
func (e RelationshipReadRequestValidationError) Cause() error { return e.cause }
6283
6284
// Key function returns key value.
6285
func (e RelationshipReadRequestValidationError) Key() bool { return e.key }
6286
6287
// ErrorName returns error name.
6288
func (e RelationshipReadRequestValidationError) ErrorName() string {
6289
	return "RelationshipReadRequestValidationError"
6290
}
6291
6292
// Error satisfies the builtin error interface
6293
func (e RelationshipReadRequestValidationError) Error() string {
6294
	cause := ""
6295
	if e.cause != nil {
6296
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6297
	}
6298
6299
	key := ""
6300
	if e.key {
6301
		key = "key for "
6302
	}
6303
6304
	return fmt.Sprintf(
6305
		"invalid %sRelationshipReadRequest.%s: %s%s",
6306
		key,
6307
		e.field,
6308
		e.reason,
6309
		cause)
6310
}
6311
6312
var _ error = RelationshipReadRequestValidationError{}
6313
6314
var _ interface {
6315
	Field() string
6316
	Reason() string
6317
	Key() bool
6318
	Cause() error
6319
	ErrorName() string
6320
} = RelationshipReadRequestValidationError{}
6321
6322
var _RelationshipReadRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
6323
6324
// Validate checks the field values on RelationshipReadRequestMetadata with the
6325
// rules defined in the proto definition for this message. If any rules are
6326
// violated, the first error encountered is returned, or nil if there are no violations.
6327
func (m *RelationshipReadRequestMetadata) Validate() error {
6328
	return m.validate(false)
6329
}
6330
6331
// ValidateAll checks the field values on RelationshipReadRequestMetadata with
6332
// the rules defined in the proto definition for this message. If any rules
6333
// are violated, the result is a list of violation errors wrapped in
6334
// RelationshipReadRequestMetadataMultiError, or nil if none found.
6335
func (m *RelationshipReadRequestMetadata) ValidateAll() error {
6336
	return m.validate(true)
6337
}
6338
6339
func (m *RelationshipReadRequestMetadata) validate(all bool) error {
6340
	if m == nil {
6341
		return nil
6342
	}
6343
6344
	var errors []error
6345
6346
	// no validation rules for SnapToken
6347
6348
	if len(errors) > 0 {
6349
		return RelationshipReadRequestMetadataMultiError(errors)
6350
	}
6351
6352
	return nil
6353
}
6354
6355
// RelationshipReadRequestMetadataMultiError is an error wrapping multiple
6356
// validation errors returned by RelationshipReadRequestMetadata.ValidateAll()
6357
// if the designated constraints aren't met.
6358
type RelationshipReadRequestMetadataMultiError []error
6359
6360
// Error returns a concatenation of all the error messages it wraps.
6361
func (m RelationshipReadRequestMetadataMultiError) Error() string {
6362
	var msgs []string
6363
	for _, err := range m {
6364
		msgs = append(msgs, err.Error())
6365
	}
6366
	return strings.Join(msgs, "; ")
6367
}
6368
6369
// AllErrors returns a list of validation violation errors.
6370
func (m RelationshipReadRequestMetadataMultiError) AllErrors() []error { return m }
6371
6372
// RelationshipReadRequestMetadataValidationError is the validation error
6373
// returned by RelationshipReadRequestMetadata.Validate if the designated
6374
// constraints aren't met.
6375
type RelationshipReadRequestMetadataValidationError struct {
6376
	field  string
6377
	reason string
6378
	cause  error
6379
	key    bool
6380
}
6381
6382
// Field function returns field value.
6383
func (e RelationshipReadRequestMetadataValidationError) Field() string { return e.field }
6384
6385
// Reason function returns reason value.
6386
func (e RelationshipReadRequestMetadataValidationError) Reason() string { return e.reason }
6387
6388
// Cause function returns cause value.
6389
func (e RelationshipReadRequestMetadataValidationError) Cause() error { return e.cause }
6390
6391
// Key function returns key value.
6392
func (e RelationshipReadRequestMetadataValidationError) Key() bool { return e.key }
6393
6394
// ErrorName returns error name.
6395
func (e RelationshipReadRequestMetadataValidationError) ErrorName() string {
6396
	return "RelationshipReadRequestMetadataValidationError"
6397
}
6398
6399
// Error satisfies the builtin error interface
6400
func (e RelationshipReadRequestMetadataValidationError) Error() string {
6401
	cause := ""
6402
	if e.cause != nil {
6403
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6404
	}
6405
6406
	key := ""
6407
	if e.key {
6408
		key = "key for "
6409
	}
6410
6411
	return fmt.Sprintf(
6412
		"invalid %sRelationshipReadRequestMetadata.%s: %s%s",
6413
		key,
6414
		e.field,
6415
		e.reason,
6416
		cause)
6417
}
6418
6419
var _ error = RelationshipReadRequestMetadataValidationError{}
6420
6421
var _ interface {
6422
	Field() string
6423
	Reason() string
6424
	Key() bool
6425
	Cause() error
6426
	ErrorName() string
6427
} = RelationshipReadRequestMetadataValidationError{}
6428
6429
// Validate checks the field values on RelationshipReadResponse with the rules
6430
// defined in the proto definition for this message. If any rules are
6431
// violated, the first error encountered is returned, or nil if there are no violations.
6432
func (m *RelationshipReadResponse) Validate() error {
6433
	return m.validate(false)
6434
}
6435
6436
// ValidateAll checks the field values on RelationshipReadResponse with the
6437
// rules defined in the proto definition for this message. If any rules are
6438
// violated, the result is a list of violation errors wrapped in
6439
// RelationshipReadResponseMultiError, or nil if none found.
6440
func (m *RelationshipReadResponse) ValidateAll() error {
6441
	return m.validate(true)
6442
}
6443
6444
func (m *RelationshipReadResponse) validate(all bool) error {
6445
	if m == nil {
6446
		return nil
6447
	}
6448
6449
	var errors []error
6450
6451
	for idx, item := range m.GetTuples() {
6452
		_, _ = idx, item
6453
6454
		if all {
6455
			switch v := interface{}(item).(type) {
6456
			case interface{ ValidateAll() error }:
6457
				if err := v.ValidateAll(); err != nil {
6458
					errors = append(errors, RelationshipReadResponseValidationError{
6459
						field:  fmt.Sprintf("Tuples[%v]", idx),
6460
						reason: "embedded message failed validation",
6461
						cause:  err,
6462
					})
6463
				}
6464
			case interface{ Validate() error }:
6465
				if err := v.Validate(); err != nil {
6466
					errors = append(errors, RelationshipReadResponseValidationError{
6467
						field:  fmt.Sprintf("Tuples[%v]", idx),
6468
						reason: "embedded message failed validation",
6469
						cause:  err,
6470
					})
6471
				}
6472
			}
6473
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
6474
			if err := v.Validate(); err != nil {
6475
				return RelationshipReadResponseValidationError{
6476
					field:  fmt.Sprintf("Tuples[%v]", idx),
6477
					reason: "embedded message failed validation",
6478
					cause:  err,
6479
				}
6480
			}
6481
		}
6482
6483
	}
6484
6485
	// no validation rules for ContinuousToken
6486
6487
	if len(errors) > 0 {
6488
		return RelationshipReadResponseMultiError(errors)
6489
	}
6490
6491
	return nil
6492
}
6493
6494
// RelationshipReadResponseMultiError is an error wrapping multiple validation
6495
// errors returned by RelationshipReadResponse.ValidateAll() if the designated
6496
// constraints aren't met.
6497
type RelationshipReadResponseMultiError []error
6498
6499
// Error returns a concatenation of all the error messages it wraps.
6500
func (m RelationshipReadResponseMultiError) Error() string {
6501
	var msgs []string
6502
	for _, err := range m {
6503
		msgs = append(msgs, err.Error())
6504
	}
6505
	return strings.Join(msgs, "; ")
6506
}
6507
6508
// AllErrors returns a list of validation violation errors.
6509
func (m RelationshipReadResponseMultiError) AllErrors() []error { return m }
6510
6511
// RelationshipReadResponseValidationError is the validation error returned by
6512
// RelationshipReadResponse.Validate if the designated constraints aren't met.
6513
type RelationshipReadResponseValidationError struct {
6514
	field  string
6515
	reason string
6516
	cause  error
6517
	key    bool
6518
}
6519
6520
// Field function returns field value.
6521
func (e RelationshipReadResponseValidationError) Field() string { return e.field }
6522
6523
// Reason function returns reason value.
6524
func (e RelationshipReadResponseValidationError) Reason() string { return e.reason }
6525
6526
// Cause function returns cause value.
6527
func (e RelationshipReadResponseValidationError) Cause() error { return e.cause }
6528
6529
// Key function returns key value.
6530
func (e RelationshipReadResponseValidationError) Key() bool { return e.key }
6531
6532
// ErrorName returns error name.
6533
func (e RelationshipReadResponseValidationError) ErrorName() string {
6534
	return "RelationshipReadResponseValidationError"
6535
}
6536
6537
// Error satisfies the builtin error interface
6538
func (e RelationshipReadResponseValidationError) Error() string {
6539
	cause := ""
6540
	if e.cause != nil {
6541
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6542
	}
6543
6544
	key := ""
6545
	if e.key {
6546
		key = "key for "
6547
	}
6548
6549
	return fmt.Sprintf(
6550
		"invalid %sRelationshipReadResponse.%s: %s%s",
6551
		key,
6552
		e.field,
6553
		e.reason,
6554
		cause)
6555
}
6556
6557
var _ error = RelationshipReadResponseValidationError{}
6558
6559
var _ interface {
6560
	Field() string
6561
	Reason() string
6562
	Key() bool
6563
	Cause() error
6564
	ErrorName() string
6565
} = RelationshipReadResponseValidationError{}
6566
6567
// Validate checks the field values on AttributeReadRequest with the rules
6568
// defined in the proto definition for this message. If any rules are
6569
// violated, the first error encountered is returned, or nil if there are no violations.
6570
func (m *AttributeReadRequest) Validate() error {
6571
	return m.validate(false)
6572
}
6573
6574
// ValidateAll checks the field values on AttributeReadRequest with the rules
6575
// defined in the proto definition for this message. If any rules are
6576
// violated, the result is a list of violation errors wrapped in
6577
// AttributeReadRequestMultiError, or nil if none found.
6578
func (m *AttributeReadRequest) ValidateAll() error {
6579
	return m.validate(true)
6580
}
6581
6582
func (m *AttributeReadRequest) validate(all bool) error {
6583
	if m == nil {
6584
		return nil
6585
	}
6586
6587
	var errors []error
6588
6589
	if len(m.GetTenantId()) > 128 {
6590
		err := AttributeReadRequestValidationError{
6591
			field:  "TenantId",
6592
			reason: "value length must be at most 128 bytes",
6593
		}
6594
		if !all {
6595
			return err
6596
		}
6597
		errors = append(errors, err)
6598
	}
6599
6600
	if !_AttributeReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
6601
		err := AttributeReadRequestValidationError{
6602
			field:  "TenantId",
6603
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
6604
		}
6605
		if !all {
6606
			return err
6607
		}
6608
		errors = append(errors, err)
6609
	}
6610
6611
	if m.GetMetadata() == nil {
6612
		err := AttributeReadRequestValidationError{
6613
			field:  "Metadata",
6614
			reason: "value is required",
6615
		}
6616
		if !all {
6617
			return err
6618
		}
6619
		errors = append(errors, err)
6620
	}
6621
6622
	if all {
6623
		switch v := interface{}(m.GetMetadata()).(type) {
6624
		case interface{ ValidateAll() error }:
6625
			if err := v.ValidateAll(); err != nil {
6626
				errors = append(errors, AttributeReadRequestValidationError{
6627
					field:  "Metadata",
6628
					reason: "embedded message failed validation",
6629
					cause:  err,
6630
				})
6631
			}
6632
		case interface{ Validate() error }:
6633
			if err := v.Validate(); err != nil {
6634
				errors = append(errors, AttributeReadRequestValidationError{
6635
					field:  "Metadata",
6636
					reason: "embedded message failed validation",
6637
					cause:  err,
6638
				})
6639
			}
6640
		}
6641
	} else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
6642
		if err := v.Validate(); err != nil {
6643
			return AttributeReadRequestValidationError{
6644
				field:  "Metadata",
6645
				reason: "embedded message failed validation",
6646
				cause:  err,
6647
			}
6648
		}
6649
	}
6650
6651
	if m.GetFilter() == nil {
6652
		err := AttributeReadRequestValidationError{
6653
			field:  "Filter",
6654
			reason: "value is required",
6655
		}
6656
		if !all {
6657
			return err
6658
		}
6659
		errors = append(errors, err)
6660
	}
6661
6662
	if all {
6663
		switch v := interface{}(m.GetFilter()).(type) {
6664
		case interface{ ValidateAll() error }:
6665
			if err := v.ValidateAll(); err != nil {
6666
				errors = append(errors, AttributeReadRequestValidationError{
6667
					field:  "Filter",
6668
					reason: "embedded message failed validation",
6669
					cause:  err,
6670
				})
6671
			}
6672
		case interface{ Validate() error }:
6673
			if err := v.Validate(); err != nil {
6674
				errors = append(errors, AttributeReadRequestValidationError{
6675
					field:  "Filter",
6676
					reason: "embedded message failed validation",
6677
					cause:  err,
6678
				})
6679
			}
6680
		}
6681
	} else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok {
6682
		if err := v.Validate(); err != nil {
6683
			return AttributeReadRequestValidationError{
6684
				field:  "Filter",
6685
				reason: "embedded message failed validation",
6686
				cause:  err,
6687
			}
6688
		}
6689
	}
6690
6691
	if m.GetPageSize() != 0 {
6692
6693
		if val := m.GetPageSize(); val < 1 || val > 100 {
6694
			err := AttributeReadRequestValidationError{
6695
				field:  "PageSize",
6696
				reason: "value must be inside range [1, 100]",
6697
			}
6698
			if !all {
6699
				return err
6700
			}
6701
			errors = append(errors, err)
6702
		}
6703
6704
	}
6705
6706
	if m.GetContinuousToken() != "" {
6707
6708
	}
6709
6710
	if len(errors) > 0 {
6711
		return AttributeReadRequestMultiError(errors)
6712
	}
6713
6714
	return nil
6715
}
6716
6717
// AttributeReadRequestMultiError is an error wrapping multiple validation
6718
// errors returned by AttributeReadRequest.ValidateAll() if the designated
6719
// constraints aren't met.
6720
type AttributeReadRequestMultiError []error
6721
6722
// Error returns a concatenation of all the error messages it wraps.
6723
func (m AttributeReadRequestMultiError) Error() string {
6724
	var msgs []string
6725
	for _, err := range m {
6726
		msgs = append(msgs, err.Error())
6727
	}
6728
	return strings.Join(msgs, "; ")
6729
}
6730
6731
// AllErrors returns a list of validation violation errors.
6732
func (m AttributeReadRequestMultiError) AllErrors() []error { return m }
6733
6734
// AttributeReadRequestValidationError is the validation error returned by
6735
// AttributeReadRequest.Validate if the designated constraints aren't met.
6736
type AttributeReadRequestValidationError struct {
6737
	field  string
6738
	reason string
6739
	cause  error
6740
	key    bool
6741
}
6742
6743
// Field function returns field value.
6744
func (e AttributeReadRequestValidationError) Field() string { return e.field }
6745
6746
// Reason function returns reason value.
6747
func (e AttributeReadRequestValidationError) Reason() string { return e.reason }
6748
6749
// Cause function returns cause value.
6750
func (e AttributeReadRequestValidationError) Cause() error { return e.cause }
6751
6752
// Key function returns key value.
6753
func (e AttributeReadRequestValidationError) Key() bool { return e.key }
6754
6755
// ErrorName returns error name.
6756
func (e AttributeReadRequestValidationError) ErrorName() string {
6757
	return "AttributeReadRequestValidationError"
6758
}
6759
6760
// Error satisfies the builtin error interface
6761
func (e AttributeReadRequestValidationError) Error() string {
6762
	cause := ""
6763
	if e.cause != nil {
6764
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6765
	}
6766
6767
	key := ""
6768
	if e.key {
6769
		key = "key for "
6770
	}
6771
6772
	return fmt.Sprintf(
6773
		"invalid %sAttributeReadRequest.%s: %s%s",
6774
		key,
6775
		e.field,
6776
		e.reason,
6777
		cause)
6778
}
6779
6780
var _ error = AttributeReadRequestValidationError{}
6781
6782
var _ interface {
6783
	Field() string
6784
	Reason() string
6785
	Key() bool
6786
	Cause() error
6787
	ErrorName() string
6788
} = AttributeReadRequestValidationError{}
6789
6790
var _AttributeReadRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
6791
6792
// Validate checks the field values on AttributeReadRequestMetadata with the
6793
// rules defined in the proto definition for this message. If any rules are
6794
// violated, the first error encountered is returned, or nil if there are no violations.
6795
func (m *AttributeReadRequestMetadata) Validate() error {
6796
	return m.validate(false)
6797
}
6798
6799
// ValidateAll checks the field values on AttributeReadRequestMetadata with the
6800
// rules defined in the proto definition for this message. If any rules are
6801
// violated, the result is a list of violation errors wrapped in
6802
// AttributeReadRequestMetadataMultiError, or nil if none found.
6803
func (m *AttributeReadRequestMetadata) ValidateAll() error {
6804
	return m.validate(true)
6805
}
6806
6807
func (m *AttributeReadRequestMetadata) validate(all bool) error {
6808
	if m == nil {
6809
		return nil
6810
	}
6811
6812
	var errors []error
6813
6814
	// no validation rules for SnapToken
6815
6816
	if len(errors) > 0 {
6817
		return AttributeReadRequestMetadataMultiError(errors)
6818
	}
6819
6820
	return nil
6821
}
6822
6823
// AttributeReadRequestMetadataMultiError is an error wrapping multiple
6824
// validation errors returned by AttributeReadRequestMetadata.ValidateAll() if
6825
// the designated constraints aren't met.
6826
type AttributeReadRequestMetadataMultiError []error
6827
6828
// Error returns a concatenation of all the error messages it wraps.
6829
func (m AttributeReadRequestMetadataMultiError) Error() string {
6830
	var msgs []string
6831
	for _, err := range m {
6832
		msgs = append(msgs, err.Error())
6833
	}
6834
	return strings.Join(msgs, "; ")
6835
}
6836
6837
// AllErrors returns a list of validation violation errors.
6838
func (m AttributeReadRequestMetadataMultiError) AllErrors() []error { return m }
6839
6840
// AttributeReadRequestMetadataValidationError is the validation error returned
6841
// by AttributeReadRequestMetadata.Validate if the designated constraints
6842
// aren't met.
6843
type AttributeReadRequestMetadataValidationError struct {
6844
	field  string
6845
	reason string
6846
	cause  error
6847
	key    bool
6848
}
6849
6850
// Field function returns field value.
6851
func (e AttributeReadRequestMetadataValidationError) Field() string { return e.field }
6852
6853
// Reason function returns reason value.
6854
func (e AttributeReadRequestMetadataValidationError) Reason() string { return e.reason }
6855
6856
// Cause function returns cause value.
6857
func (e AttributeReadRequestMetadataValidationError) Cause() error { return e.cause }
6858
6859
// Key function returns key value.
6860
func (e AttributeReadRequestMetadataValidationError) Key() bool { return e.key }
6861
6862
// ErrorName returns error name.
6863
func (e AttributeReadRequestMetadataValidationError) ErrorName() string {
6864
	return "AttributeReadRequestMetadataValidationError"
6865
}
6866
6867
// Error satisfies the builtin error interface
6868
func (e AttributeReadRequestMetadataValidationError) Error() string {
6869
	cause := ""
6870
	if e.cause != nil {
6871
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
6872
	}
6873
6874
	key := ""
6875
	if e.key {
6876
		key = "key for "
6877
	}
6878
6879
	return fmt.Sprintf(
6880
		"invalid %sAttributeReadRequestMetadata.%s: %s%s",
6881
		key,
6882
		e.field,
6883
		e.reason,
6884
		cause)
6885
}
6886
6887
var _ error = AttributeReadRequestMetadataValidationError{}
6888
6889
var _ interface {
6890
	Field() string
6891
	Reason() string
6892
	Key() bool
6893
	Cause() error
6894
	ErrorName() string
6895
} = AttributeReadRequestMetadataValidationError{}
6896
6897
// Validate checks the field values on AttributeReadResponse with the rules
6898
// defined in the proto definition for this message. If any rules are
6899
// violated, the first error encountered is returned, or nil if there are no violations.
6900
func (m *AttributeReadResponse) Validate() error {
6901
	return m.validate(false)
6902
}
6903
6904
// ValidateAll checks the field values on AttributeReadResponse with the rules
6905
// defined in the proto definition for this message. If any rules are
6906
// violated, the result is a list of violation errors wrapped in
6907
// AttributeReadResponseMultiError, or nil if none found.
6908
func (m *AttributeReadResponse) ValidateAll() error {
6909
	return m.validate(true)
6910
}
6911
6912
func (m *AttributeReadResponse) validate(all bool) error {
6913
	if m == nil {
6914
		return nil
6915
	}
6916
6917
	var errors []error
6918
6919
	for idx, item := range m.GetAttributes() {
6920
		_, _ = idx, item
6921
6922
		if all {
6923
			switch v := interface{}(item).(type) {
6924
			case interface{ ValidateAll() error }:
6925
				if err := v.ValidateAll(); err != nil {
6926
					errors = append(errors, AttributeReadResponseValidationError{
6927
						field:  fmt.Sprintf("Attributes[%v]", idx),
6928
						reason: "embedded message failed validation",
6929
						cause:  err,
6930
					})
6931
				}
6932
			case interface{ Validate() error }:
6933
				if err := v.Validate(); err != nil {
6934
					errors = append(errors, AttributeReadResponseValidationError{
6935
						field:  fmt.Sprintf("Attributes[%v]", idx),
6936
						reason: "embedded message failed validation",
6937
						cause:  err,
6938
					})
6939
				}
6940
			}
6941
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
6942
			if err := v.Validate(); err != nil {
6943
				return AttributeReadResponseValidationError{
6944
					field:  fmt.Sprintf("Attributes[%v]", idx),
6945
					reason: "embedded message failed validation",
6946
					cause:  err,
6947
				}
6948
			}
6949
		}
6950
6951
	}
6952
6953
	// no validation rules for ContinuousToken
6954
6955
	if len(errors) > 0 {
6956
		return AttributeReadResponseMultiError(errors)
6957
	}
6958
6959
	return nil
6960
}
6961
6962
// AttributeReadResponseMultiError is an error wrapping multiple validation
6963
// errors returned by AttributeReadResponse.ValidateAll() if the designated
6964
// constraints aren't met.
6965
type AttributeReadResponseMultiError []error
6966
6967
// Error returns a concatenation of all the error messages it wraps.
6968
func (m AttributeReadResponseMultiError) Error() string {
6969
	var msgs []string
6970
	for _, err := range m {
6971
		msgs = append(msgs, err.Error())
6972
	}
6973
	return strings.Join(msgs, "; ")
6974
}
6975
6976
// AllErrors returns a list of validation violation errors.
6977
func (m AttributeReadResponseMultiError) AllErrors() []error { return m }
6978
6979
// AttributeReadResponseValidationError is the validation error returned by
6980
// AttributeReadResponse.Validate if the designated constraints aren't met.
6981
type AttributeReadResponseValidationError struct {
6982
	field  string
6983
	reason string
6984
	cause  error
6985
	key    bool
6986
}
6987
6988
// Field function returns field value.
6989
func (e AttributeReadResponseValidationError) Field() string { return e.field }
6990
6991
// Reason function returns reason value.
6992
func (e AttributeReadResponseValidationError) Reason() string { return e.reason }
6993
6994
// Cause function returns cause value.
6995
func (e AttributeReadResponseValidationError) Cause() error { return e.cause }
6996
6997
// Key function returns key value.
6998
func (e AttributeReadResponseValidationError) Key() bool { return e.key }
6999
7000
// ErrorName returns error name.
7001
func (e AttributeReadResponseValidationError) ErrorName() string {
7002
	return "AttributeReadResponseValidationError"
7003
}
7004
7005
// Error satisfies the builtin error interface
7006
func (e AttributeReadResponseValidationError) Error() string {
7007
	cause := ""
7008
	if e.cause != nil {
7009
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7010
	}
7011
7012
	key := ""
7013
	if e.key {
7014
		key = "key for "
7015
	}
7016
7017
	return fmt.Sprintf(
7018
		"invalid %sAttributeReadResponse.%s: %s%s",
7019
		key,
7020
		e.field,
7021
		e.reason,
7022
		cause)
7023
}
7024
7025
var _ error = AttributeReadResponseValidationError{}
7026
7027
var _ interface {
7028
	Field() string
7029
	Reason() string
7030
	Key() bool
7031
	Cause() error
7032
	ErrorName() string
7033
} = AttributeReadResponseValidationError{}
7034
7035
// Validate checks the field values on DataDeleteRequest with the rules defined
7036
// in the proto definition for this message. If any rules are violated, the
7037
// first error encountered is returned, or nil if there are no violations.
7038
func (m *DataDeleteRequest) Validate() error {
7039
	return m.validate(false)
7040
}
7041
7042
// ValidateAll checks the field values on DataDeleteRequest with the rules
7043
// defined in the proto definition for this message. If any rules are
7044
// violated, the result is a list of violation errors wrapped in
7045
// DataDeleteRequestMultiError, or nil if none found.
7046
func (m *DataDeleteRequest) ValidateAll() error {
7047
	return m.validate(true)
7048
}
7049
7050
func (m *DataDeleteRequest) validate(all bool) error {
7051
	if m == nil {
7052
		return nil
7053
	}
7054
7055
	var errors []error
7056
7057
	if len(m.GetTenantId()) > 128 {
7058
		err := DataDeleteRequestValidationError{
7059
			field:  "TenantId",
7060
			reason: "value length must be at most 128 bytes",
7061
		}
7062
		if !all {
7063
			return err
7064
		}
7065
		errors = append(errors, err)
7066
	}
7067
7068
	if !_DataDeleteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
7069
		err := DataDeleteRequestValidationError{
7070
			field:  "TenantId",
7071
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
7072
		}
7073
		if !all {
7074
			return err
7075
		}
7076
		errors = append(errors, err)
7077
	}
7078
7079
	if m.GetTupleFilter() == nil {
7080
		err := DataDeleteRequestValidationError{
7081
			field:  "TupleFilter",
7082
			reason: "value is required",
7083
		}
7084
		if !all {
7085
			return err
7086
		}
7087
		errors = append(errors, err)
7088
	}
7089
7090
	if all {
7091
		switch v := interface{}(m.GetTupleFilter()).(type) {
7092
		case interface{ ValidateAll() error }:
7093
			if err := v.ValidateAll(); err != nil {
7094
				errors = append(errors, DataDeleteRequestValidationError{
7095
					field:  "TupleFilter",
7096
					reason: "embedded message failed validation",
7097
					cause:  err,
7098
				})
7099
			}
7100
		case interface{ Validate() error }:
7101
			if err := v.Validate(); err != nil {
7102
				errors = append(errors, DataDeleteRequestValidationError{
7103
					field:  "TupleFilter",
7104
					reason: "embedded message failed validation",
7105
					cause:  err,
7106
				})
7107
			}
7108
		}
7109
	} else if v, ok := interface{}(m.GetTupleFilter()).(interface{ Validate() error }); ok {
7110
		if err := v.Validate(); err != nil {
7111
			return DataDeleteRequestValidationError{
7112
				field:  "TupleFilter",
7113
				reason: "embedded message failed validation",
7114
				cause:  err,
7115
			}
7116
		}
7117
	}
7118
7119
	if m.GetAttributeFilter() == nil {
7120
		err := DataDeleteRequestValidationError{
7121
			field:  "AttributeFilter",
7122
			reason: "value is required",
7123
		}
7124
		if !all {
7125
			return err
7126
		}
7127
		errors = append(errors, err)
7128
	}
7129
7130
	if all {
7131
		switch v := interface{}(m.GetAttributeFilter()).(type) {
7132
		case interface{ ValidateAll() error }:
7133
			if err := v.ValidateAll(); err != nil {
7134
				errors = append(errors, DataDeleteRequestValidationError{
7135
					field:  "AttributeFilter",
7136
					reason: "embedded message failed validation",
7137
					cause:  err,
7138
				})
7139
			}
7140
		case interface{ Validate() error }:
7141
			if err := v.Validate(); err != nil {
7142
				errors = append(errors, DataDeleteRequestValidationError{
7143
					field:  "AttributeFilter",
7144
					reason: "embedded message failed validation",
7145
					cause:  err,
7146
				})
7147
			}
7148
		}
7149
	} else if v, ok := interface{}(m.GetAttributeFilter()).(interface{ Validate() error }); ok {
7150
		if err := v.Validate(); err != nil {
7151
			return DataDeleteRequestValidationError{
7152
				field:  "AttributeFilter",
7153
				reason: "embedded message failed validation",
7154
				cause:  err,
7155
			}
7156
		}
7157
	}
7158
7159
	if len(errors) > 0 {
7160
		return DataDeleteRequestMultiError(errors)
7161
	}
7162
7163
	return nil
7164
}
7165
7166
// DataDeleteRequestMultiError is an error wrapping multiple validation errors
7167
// returned by DataDeleteRequest.ValidateAll() if the designated constraints
7168
// aren't met.
7169
type DataDeleteRequestMultiError []error
7170
7171
// Error returns a concatenation of all the error messages it wraps.
7172
func (m DataDeleteRequestMultiError) Error() string {
7173
	var msgs []string
7174
	for _, err := range m {
7175
		msgs = append(msgs, err.Error())
7176
	}
7177
	return strings.Join(msgs, "; ")
7178
}
7179
7180
// AllErrors returns a list of validation violation errors.
7181
func (m DataDeleteRequestMultiError) AllErrors() []error { return m }
7182
7183
// DataDeleteRequestValidationError is the validation error returned by
7184
// DataDeleteRequest.Validate if the designated constraints aren't met.
7185
type DataDeleteRequestValidationError struct {
7186
	field  string
7187
	reason string
7188
	cause  error
7189
	key    bool
7190
}
7191
7192
// Field function returns field value.
7193
func (e DataDeleteRequestValidationError) Field() string { return e.field }
7194
7195
// Reason function returns reason value.
7196
func (e DataDeleteRequestValidationError) Reason() string { return e.reason }
7197
7198
// Cause function returns cause value.
7199
func (e DataDeleteRequestValidationError) Cause() error { return e.cause }
7200
7201
// Key function returns key value.
7202
func (e DataDeleteRequestValidationError) Key() bool { return e.key }
7203
7204
// ErrorName returns error name.
7205
func (e DataDeleteRequestValidationError) ErrorName() string {
7206
	return "DataDeleteRequestValidationError"
7207
}
7208
7209
// Error satisfies the builtin error interface
7210
func (e DataDeleteRequestValidationError) Error() string {
7211
	cause := ""
7212
	if e.cause != nil {
7213
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7214
	}
7215
7216
	key := ""
7217
	if e.key {
7218
		key = "key for "
7219
	}
7220
7221
	return fmt.Sprintf(
7222
		"invalid %sDataDeleteRequest.%s: %s%s",
7223
		key,
7224
		e.field,
7225
		e.reason,
7226
		cause)
7227
}
7228
7229
var _ error = DataDeleteRequestValidationError{}
7230
7231
var _ interface {
7232
	Field() string
7233
	Reason() string
7234
	Key() bool
7235
	Cause() error
7236
	ErrorName() string
7237
} = DataDeleteRequestValidationError{}
7238
7239
var _DataDeleteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
7240
7241
// Validate checks the field values on DataDeleteResponse with the rules
7242
// defined in the proto definition for this message. If any rules are
7243
// violated, the first error encountered is returned, or nil if there are no violations.
7244
func (m *DataDeleteResponse) Validate() error {
7245
	return m.validate(false)
7246
}
7247
7248
// ValidateAll checks the field values on DataDeleteResponse with the rules
7249
// defined in the proto definition for this message. If any rules are
7250
// violated, the result is a list of violation errors wrapped in
7251
// DataDeleteResponseMultiError, or nil if none found.
7252
func (m *DataDeleteResponse) ValidateAll() error {
7253
	return m.validate(true)
7254
}
7255
7256
func (m *DataDeleteResponse) validate(all bool) error {
7257
	if m == nil {
7258
		return nil
7259
	}
7260
7261
	var errors []error
7262
7263
	// no validation rules for SnapToken
7264
7265
	if len(errors) > 0 {
7266
		return DataDeleteResponseMultiError(errors)
7267
	}
7268
7269
	return nil
7270
}
7271
7272
// DataDeleteResponseMultiError is an error wrapping multiple validation errors
7273
// returned by DataDeleteResponse.ValidateAll() if the designated constraints
7274
// aren't met.
7275
type DataDeleteResponseMultiError []error
7276
7277
// Error returns a concatenation of all the error messages it wraps.
7278
func (m DataDeleteResponseMultiError) Error() string {
7279
	var msgs []string
7280
	for _, err := range m {
7281
		msgs = append(msgs, err.Error())
7282
	}
7283
	return strings.Join(msgs, "; ")
7284
}
7285
7286
// AllErrors returns a list of validation violation errors.
7287
func (m DataDeleteResponseMultiError) AllErrors() []error { return m }
7288
7289
// DataDeleteResponseValidationError is the validation error returned by
7290
// DataDeleteResponse.Validate if the designated constraints aren't met.
7291
type DataDeleteResponseValidationError struct {
7292
	field  string
7293
	reason string
7294
	cause  error
7295
	key    bool
7296
}
7297
7298
// Field function returns field value.
7299
func (e DataDeleteResponseValidationError) Field() string { return e.field }
7300
7301
// Reason function returns reason value.
7302
func (e DataDeleteResponseValidationError) Reason() string { return e.reason }
7303
7304
// Cause function returns cause value.
7305
func (e DataDeleteResponseValidationError) Cause() error { return e.cause }
7306
7307
// Key function returns key value.
7308
func (e DataDeleteResponseValidationError) Key() bool { return e.key }
7309
7310
// ErrorName returns error name.
7311
func (e DataDeleteResponseValidationError) ErrorName() string {
7312
	return "DataDeleteResponseValidationError"
7313
}
7314
7315
// Error satisfies the builtin error interface
7316
func (e DataDeleteResponseValidationError) Error() string {
7317
	cause := ""
7318
	if e.cause != nil {
7319
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7320
	}
7321
7322
	key := ""
7323
	if e.key {
7324
		key = "key for "
7325
	}
7326
7327
	return fmt.Sprintf(
7328
		"invalid %sDataDeleteResponse.%s: %s%s",
7329
		key,
7330
		e.field,
7331
		e.reason,
7332
		cause)
7333
}
7334
7335
var _ error = DataDeleteResponseValidationError{}
7336
7337
var _ interface {
7338
	Field() string
7339
	Reason() string
7340
	Key() bool
7341
	Cause() error
7342
	ErrorName() string
7343
} = DataDeleteResponseValidationError{}
7344
7345
// Validate checks the field values on RelationshipDeleteRequest with the rules
7346
// defined in the proto definition for this message. If any rules are
7347
// violated, the first error encountered is returned, or nil if there are no violations.
7348
func (m *RelationshipDeleteRequest) Validate() error {
7349
	return m.validate(false)
7350
}
7351
7352
// ValidateAll checks the field values on RelationshipDeleteRequest with the
7353
// rules defined in the proto definition for this message. If any rules are
7354
// violated, the result is a list of violation errors wrapped in
7355
// RelationshipDeleteRequestMultiError, or nil if none found.
7356
func (m *RelationshipDeleteRequest) ValidateAll() error {
7357
	return m.validate(true)
7358
}
7359
7360
func (m *RelationshipDeleteRequest) validate(all bool) error {
7361
	if m == nil {
7362
		return nil
7363
	}
7364
7365
	var errors []error
7366
7367
	if len(m.GetTenantId()) > 128 {
7368
		err := RelationshipDeleteRequestValidationError{
7369
			field:  "TenantId",
7370
			reason: "value length must be at most 128 bytes",
7371
		}
7372
		if !all {
7373
			return err
7374
		}
7375
		errors = append(errors, err)
7376
	}
7377
7378
	if !_RelationshipDeleteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
7379
		err := RelationshipDeleteRequestValidationError{
7380
			field:  "TenantId",
7381
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
7382
		}
7383
		if !all {
7384
			return err
7385
		}
7386
		errors = append(errors, err)
7387
	}
7388
7389
	if all {
7390
		switch v := interface{}(m.GetFilter()).(type) {
7391
		case interface{ ValidateAll() error }:
7392
			if err := v.ValidateAll(); err != nil {
7393
				errors = append(errors, RelationshipDeleteRequestValidationError{
7394
					field:  "Filter",
7395
					reason: "embedded message failed validation",
7396
					cause:  err,
7397
				})
7398
			}
7399
		case interface{ Validate() error }:
7400
			if err := v.Validate(); err != nil {
7401
				errors = append(errors, RelationshipDeleteRequestValidationError{
7402
					field:  "Filter",
7403
					reason: "embedded message failed validation",
7404
					cause:  err,
7405
				})
7406
			}
7407
		}
7408
	} else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok {
7409
		if err := v.Validate(); err != nil {
7410
			return RelationshipDeleteRequestValidationError{
7411
				field:  "Filter",
7412
				reason: "embedded message failed validation",
7413
				cause:  err,
7414
			}
7415
		}
7416
	}
7417
7418
	if len(errors) > 0 {
7419
		return RelationshipDeleteRequestMultiError(errors)
7420
	}
7421
7422
	return nil
7423
}
7424
7425
// RelationshipDeleteRequestMultiError is an error wrapping multiple validation
7426
// errors returned by RelationshipDeleteRequest.ValidateAll() if the
7427
// designated constraints aren't met.
7428
type RelationshipDeleteRequestMultiError []error
7429
7430
// Error returns a concatenation of all the error messages it wraps.
7431
func (m RelationshipDeleteRequestMultiError) Error() string {
7432
	var msgs []string
7433
	for _, err := range m {
7434
		msgs = append(msgs, err.Error())
7435
	}
7436
	return strings.Join(msgs, "; ")
7437
}
7438
7439
// AllErrors returns a list of validation violation errors.
7440
func (m RelationshipDeleteRequestMultiError) AllErrors() []error { return m }
7441
7442
// RelationshipDeleteRequestValidationError is the validation error returned by
7443
// RelationshipDeleteRequest.Validate if the designated constraints aren't met.
7444
type RelationshipDeleteRequestValidationError struct {
7445
	field  string
7446
	reason string
7447
	cause  error
7448
	key    bool
7449
}
7450
7451
// Field function returns field value.
7452
func (e RelationshipDeleteRequestValidationError) Field() string { return e.field }
7453
7454
// Reason function returns reason value.
7455
func (e RelationshipDeleteRequestValidationError) Reason() string { return e.reason }
7456
7457
// Cause function returns cause value.
7458
func (e RelationshipDeleteRequestValidationError) Cause() error { return e.cause }
7459
7460
// Key function returns key value.
7461
func (e RelationshipDeleteRequestValidationError) Key() bool { return e.key }
7462
7463
// ErrorName returns error name.
7464
func (e RelationshipDeleteRequestValidationError) ErrorName() string {
7465
	return "RelationshipDeleteRequestValidationError"
7466
}
7467
7468
// Error satisfies the builtin error interface
7469
func (e RelationshipDeleteRequestValidationError) Error() string {
7470
	cause := ""
7471
	if e.cause != nil {
7472
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7473
	}
7474
7475
	key := ""
7476
	if e.key {
7477
		key = "key for "
7478
	}
7479
7480
	return fmt.Sprintf(
7481
		"invalid %sRelationshipDeleteRequest.%s: %s%s",
7482
		key,
7483
		e.field,
7484
		e.reason,
7485
		cause)
7486
}
7487
7488
var _ error = RelationshipDeleteRequestValidationError{}
7489
7490
var _ interface {
7491
	Field() string
7492
	Reason() string
7493
	Key() bool
7494
	Cause() error
7495
	ErrorName() string
7496
} = RelationshipDeleteRequestValidationError{}
7497
7498
var _RelationshipDeleteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
7499
7500
// Validate checks the field values on RelationshipDeleteResponse with the
7501
// rules defined in the proto definition for this message. If any rules are
7502
// violated, the first error encountered is returned, or nil if there are no violations.
7503
func (m *RelationshipDeleteResponse) Validate() error {
7504
	return m.validate(false)
7505
}
7506
7507
// ValidateAll checks the field values on RelationshipDeleteResponse with the
7508
// rules defined in the proto definition for this message. If any rules are
7509
// violated, the result is a list of violation errors wrapped in
7510
// RelationshipDeleteResponseMultiError, or nil if none found.
7511
func (m *RelationshipDeleteResponse) ValidateAll() error {
7512
	return m.validate(true)
7513
}
7514
7515
func (m *RelationshipDeleteResponse) validate(all bool) error {
7516
	if m == nil {
7517
		return nil
7518
	}
7519
7520
	var errors []error
7521
7522
	// no validation rules for SnapToken
7523
7524
	if len(errors) > 0 {
7525
		return RelationshipDeleteResponseMultiError(errors)
7526
	}
7527
7528
	return nil
7529
}
7530
7531
// RelationshipDeleteResponseMultiError is an error wrapping multiple
7532
// validation errors returned by RelationshipDeleteResponse.ValidateAll() if
7533
// the designated constraints aren't met.
7534
type RelationshipDeleteResponseMultiError []error
7535
7536
// Error returns a concatenation of all the error messages it wraps.
7537
func (m RelationshipDeleteResponseMultiError) Error() string {
7538
	var msgs []string
7539
	for _, err := range m {
7540
		msgs = append(msgs, err.Error())
7541
	}
7542
	return strings.Join(msgs, "; ")
7543
}
7544
7545
// AllErrors returns a list of validation violation errors.
7546
func (m RelationshipDeleteResponseMultiError) AllErrors() []error { return m }
7547
7548
// RelationshipDeleteResponseValidationError is the validation error returned
7549
// by RelationshipDeleteResponse.Validate if the designated constraints aren't met.
7550
type RelationshipDeleteResponseValidationError struct {
7551
	field  string
7552
	reason string
7553
	cause  error
7554
	key    bool
7555
}
7556
7557
// Field function returns field value.
7558
func (e RelationshipDeleteResponseValidationError) Field() string { return e.field }
7559
7560
// Reason function returns reason value.
7561
func (e RelationshipDeleteResponseValidationError) Reason() string { return e.reason }
7562
7563
// Cause function returns cause value.
7564
func (e RelationshipDeleteResponseValidationError) Cause() error { return e.cause }
7565
7566
// Key function returns key value.
7567
func (e RelationshipDeleteResponseValidationError) Key() bool { return e.key }
7568
7569
// ErrorName returns error name.
7570
func (e RelationshipDeleteResponseValidationError) ErrorName() string {
7571
	return "RelationshipDeleteResponseValidationError"
7572
}
7573
7574
// Error satisfies the builtin error interface
7575
func (e RelationshipDeleteResponseValidationError) Error() string {
7576
	cause := ""
7577
	if e.cause != nil {
7578
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7579
	}
7580
7581
	key := ""
7582
	if e.key {
7583
		key = "key for "
7584
	}
7585
7586
	return fmt.Sprintf(
7587
		"invalid %sRelationshipDeleteResponse.%s: %s%s",
7588
		key,
7589
		e.field,
7590
		e.reason,
7591
		cause)
7592
}
7593
7594
var _ error = RelationshipDeleteResponseValidationError{}
7595
7596
var _ interface {
7597
	Field() string
7598
	Reason() string
7599
	Key() bool
7600
	Cause() error
7601
	ErrorName() string
7602
} = RelationshipDeleteResponseValidationError{}
7603
7604
// Validate checks the field values on BundleRunRequest with the rules defined
7605
// in the proto definition for this message. If any rules are violated, the
7606
// first error encountered is returned, or nil if there are no violations.
7607
func (m *BundleRunRequest) Validate() error {
7608
	return m.validate(false)
7609
}
7610
7611
// ValidateAll checks the field values on BundleRunRequest with the rules
7612
// defined in the proto definition for this message. If any rules are
7613
// violated, the result is a list of violation errors wrapped in
7614
// BundleRunRequestMultiError, or nil if none found.
7615
func (m *BundleRunRequest) ValidateAll() error {
7616
	return m.validate(true)
7617
}
7618
7619
func (m *BundleRunRequest) validate(all bool) error {
7620
	if m == nil {
7621
		return nil
7622
	}
7623
7624
	var errors []error
7625
7626
	if len(m.GetTenantId()) > 128 {
7627
		err := BundleRunRequestValidationError{
7628
			field:  "TenantId",
7629
			reason: "value length must be at most 128 bytes",
7630
		}
7631
		if !all {
7632
			return err
7633
		}
7634
		errors = append(errors, err)
7635
	}
7636
7637
	if !_BundleRunRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
7638
		err := BundleRunRequestValidationError{
7639
			field:  "TenantId",
7640
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
7641
		}
7642
		if !all {
7643
			return err
7644
		}
7645
		errors = append(errors, err)
7646
	}
7647
7648
	// no validation rules for Name
7649
7650
	// no validation rules for Arguments
7651
7652
	if len(errors) > 0 {
7653
		return BundleRunRequestMultiError(errors)
7654
	}
7655
7656
	return nil
7657
}
7658
7659
// BundleRunRequestMultiError is an error wrapping multiple validation errors
7660
// returned by BundleRunRequest.ValidateAll() if the designated constraints
7661
// aren't met.
7662
type BundleRunRequestMultiError []error
7663
7664
// Error returns a concatenation of all the error messages it wraps.
7665
func (m BundleRunRequestMultiError) Error() string {
7666
	var msgs []string
7667
	for _, err := range m {
7668
		msgs = append(msgs, err.Error())
7669
	}
7670
	return strings.Join(msgs, "; ")
7671
}
7672
7673
// AllErrors returns a list of validation violation errors.
7674
func (m BundleRunRequestMultiError) AllErrors() []error { return m }
7675
7676
// BundleRunRequestValidationError is the validation error returned by
7677
// BundleRunRequest.Validate if the designated constraints aren't met.
7678
type BundleRunRequestValidationError struct {
7679
	field  string
7680
	reason string
7681
	cause  error
7682
	key    bool
7683
}
7684
7685
// Field function returns field value.
7686
func (e BundleRunRequestValidationError) Field() string { return e.field }
7687
7688
// Reason function returns reason value.
7689
func (e BundleRunRequestValidationError) Reason() string { return e.reason }
7690
7691
// Cause function returns cause value.
7692
func (e BundleRunRequestValidationError) Cause() error { return e.cause }
7693
7694
// Key function returns key value.
7695
func (e BundleRunRequestValidationError) Key() bool { return e.key }
7696
7697
// ErrorName returns error name.
7698
func (e BundleRunRequestValidationError) ErrorName() string { return "BundleRunRequestValidationError" }
7699
7700
// Error satisfies the builtin error interface
7701
func (e BundleRunRequestValidationError) Error() string {
7702
	cause := ""
7703
	if e.cause != nil {
7704
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7705
	}
7706
7707
	key := ""
7708
	if e.key {
7709
		key = "key for "
7710
	}
7711
7712
	return fmt.Sprintf(
7713
		"invalid %sBundleRunRequest.%s: %s%s",
7714
		key,
7715
		e.field,
7716
		e.reason,
7717
		cause)
7718
}
7719
7720
var _ error = BundleRunRequestValidationError{}
7721
7722
var _ interface {
7723
	Field() string
7724
	Reason() string
7725
	Key() bool
7726
	Cause() error
7727
	ErrorName() string
7728
} = BundleRunRequestValidationError{}
7729
7730
var _BundleRunRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
7731
7732
// Validate checks the field values on BundleRunResponse with the rules defined
7733
// in the proto definition for this message. If any rules are violated, the
7734
// first error encountered is returned, or nil if there are no violations.
7735
func (m *BundleRunResponse) Validate() error {
7736
	return m.validate(false)
7737
}
7738
7739
// ValidateAll checks the field values on BundleRunResponse with the rules
7740
// defined in the proto definition for this message. If any rules are
7741
// violated, the result is a list of violation errors wrapped in
7742
// BundleRunResponseMultiError, or nil if none found.
7743
func (m *BundleRunResponse) ValidateAll() error {
7744
	return m.validate(true)
7745
}
7746
7747
func (m *BundleRunResponse) validate(all bool) error {
7748
	if m == nil {
7749
		return nil
7750
	}
7751
7752
	var errors []error
7753
7754
	// no validation rules for SnapToken
7755
7756
	if len(errors) > 0 {
7757
		return BundleRunResponseMultiError(errors)
7758
	}
7759
7760
	return nil
7761
}
7762
7763
// BundleRunResponseMultiError is an error wrapping multiple validation errors
7764
// returned by BundleRunResponse.ValidateAll() if the designated constraints
7765
// aren't met.
7766
type BundleRunResponseMultiError []error
7767
7768
// Error returns a concatenation of all the error messages it wraps.
7769
func (m BundleRunResponseMultiError) Error() string {
7770
	var msgs []string
7771
	for _, err := range m {
7772
		msgs = append(msgs, err.Error())
7773
	}
7774
	return strings.Join(msgs, "; ")
7775
}
7776
7777
// AllErrors returns a list of validation violation errors.
7778
func (m BundleRunResponseMultiError) AllErrors() []error { return m }
7779
7780
// BundleRunResponseValidationError is the validation error returned by
7781
// BundleRunResponse.Validate if the designated constraints aren't met.
7782
type BundleRunResponseValidationError struct {
7783
	field  string
7784
	reason string
7785
	cause  error
7786
	key    bool
7787
}
7788
7789
// Field function returns field value.
7790
func (e BundleRunResponseValidationError) Field() string { return e.field }
7791
7792
// Reason function returns reason value.
7793
func (e BundleRunResponseValidationError) Reason() string { return e.reason }
7794
7795
// Cause function returns cause value.
7796
func (e BundleRunResponseValidationError) Cause() error { return e.cause }
7797
7798
// Key function returns key value.
7799
func (e BundleRunResponseValidationError) Key() bool { return e.key }
7800
7801
// ErrorName returns error name.
7802
func (e BundleRunResponseValidationError) ErrorName() string {
7803
	return "BundleRunResponseValidationError"
7804
}
7805
7806
// Error satisfies the builtin error interface
7807
func (e BundleRunResponseValidationError) Error() string {
7808
	cause := ""
7809
	if e.cause != nil {
7810
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7811
	}
7812
7813
	key := ""
7814
	if e.key {
7815
		key = "key for "
7816
	}
7817
7818
	return fmt.Sprintf(
7819
		"invalid %sBundleRunResponse.%s: %s%s",
7820
		key,
7821
		e.field,
7822
		e.reason,
7823
		cause)
7824
}
7825
7826
var _ error = BundleRunResponseValidationError{}
7827
7828
var _ interface {
7829
	Field() string
7830
	Reason() string
7831
	Key() bool
7832
	Cause() error
7833
	ErrorName() string
7834
} = BundleRunResponseValidationError{}
7835
7836
// Validate checks the field values on BundleWriteRequest with the rules
7837
// defined in the proto definition for this message. If any rules are
7838
// violated, the first error encountered is returned, or nil if there are no violations.
7839
func (m *BundleWriteRequest) Validate() error {
7840
	return m.validate(false)
7841
}
7842
7843
// ValidateAll checks the field values on BundleWriteRequest with the rules
7844
// defined in the proto definition for this message. If any rules are
7845
// violated, the result is a list of violation errors wrapped in
7846
// BundleWriteRequestMultiError, or nil if none found.
7847
func (m *BundleWriteRequest) ValidateAll() error {
7848
	return m.validate(true)
7849
}
7850
7851
func (m *BundleWriteRequest) validate(all bool) error {
7852
	if m == nil {
7853
		return nil
7854
	}
7855
7856
	var errors []error
7857
7858
	if len(m.GetTenantId()) > 128 {
7859
		err := BundleWriteRequestValidationError{
7860
			field:  "TenantId",
7861
			reason: "value length must be at most 128 bytes",
7862
		}
7863
		if !all {
7864
			return err
7865
		}
7866
		errors = append(errors, err)
7867
	}
7868
7869
	if !_BundleWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
7870
		err := BundleWriteRequestValidationError{
7871
			field:  "TenantId",
7872
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
7873
		}
7874
		if !all {
7875
			return err
7876
		}
7877
		errors = append(errors, err)
7878
	}
7879
7880
	for idx, item := range m.GetBundles() {
7881
		_, _ = idx, item
7882
7883
		if all {
7884
			switch v := interface{}(item).(type) {
7885
			case interface{ ValidateAll() error }:
7886
				if err := v.ValidateAll(); err != nil {
7887
					errors = append(errors, BundleWriteRequestValidationError{
7888
						field:  fmt.Sprintf("Bundles[%v]", idx),
7889
						reason: "embedded message failed validation",
7890
						cause:  err,
7891
					})
7892
				}
7893
			case interface{ Validate() error }:
7894
				if err := v.Validate(); err != nil {
7895
					errors = append(errors, BundleWriteRequestValidationError{
7896
						field:  fmt.Sprintf("Bundles[%v]", idx),
7897
						reason: "embedded message failed validation",
7898
						cause:  err,
7899
					})
7900
				}
7901
			}
7902
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
7903
			if err := v.Validate(); err != nil {
7904
				return BundleWriteRequestValidationError{
7905
					field:  fmt.Sprintf("Bundles[%v]", idx),
7906
					reason: "embedded message failed validation",
7907
					cause:  err,
7908
				}
7909
			}
7910
		}
7911
7912
	}
7913
7914
	if len(errors) > 0 {
7915
		return BundleWriteRequestMultiError(errors)
7916
	}
7917
7918
	return nil
7919
}
7920
7921
// BundleWriteRequestMultiError is an error wrapping multiple validation errors
7922
// returned by BundleWriteRequest.ValidateAll() if the designated constraints
7923
// aren't met.
7924
type BundleWriteRequestMultiError []error
7925
7926
// Error returns a concatenation of all the error messages it wraps.
7927
func (m BundleWriteRequestMultiError) Error() string {
7928
	var msgs []string
7929
	for _, err := range m {
7930
		msgs = append(msgs, err.Error())
7931
	}
7932
	return strings.Join(msgs, "; ")
7933
}
7934
7935
// AllErrors returns a list of validation violation errors.
7936
func (m BundleWriteRequestMultiError) AllErrors() []error { return m }
7937
7938
// BundleWriteRequestValidationError is the validation error returned by
7939
// BundleWriteRequest.Validate if the designated constraints aren't met.
7940
type BundleWriteRequestValidationError struct {
7941
	field  string
7942
	reason string
7943
	cause  error
7944
	key    bool
7945
}
7946
7947
// Field function returns field value.
7948
func (e BundleWriteRequestValidationError) Field() string { return e.field }
7949
7950
// Reason function returns reason value.
7951
func (e BundleWriteRequestValidationError) Reason() string { return e.reason }
7952
7953
// Cause function returns cause value.
7954
func (e BundleWriteRequestValidationError) Cause() error { return e.cause }
7955
7956
// Key function returns key value.
7957
func (e BundleWriteRequestValidationError) Key() bool { return e.key }
7958
7959
// ErrorName returns error name.
7960
func (e BundleWriteRequestValidationError) ErrorName() string {
7961
	return "BundleWriteRequestValidationError"
7962
}
7963
7964
// Error satisfies the builtin error interface
7965
func (e BundleWriteRequestValidationError) Error() string {
7966
	cause := ""
7967
	if e.cause != nil {
7968
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
7969
	}
7970
7971
	key := ""
7972
	if e.key {
7973
		key = "key for "
7974
	}
7975
7976
	return fmt.Sprintf(
7977
		"invalid %sBundleWriteRequest.%s: %s%s",
7978
		key,
7979
		e.field,
7980
		e.reason,
7981
		cause)
7982
}
7983
7984
var _ error = BundleWriteRequestValidationError{}
7985
7986
var _ interface {
7987
	Field() string
7988
	Reason() string
7989
	Key() bool
7990
	Cause() error
7991
	ErrorName() string
7992
} = BundleWriteRequestValidationError{}
7993
7994
var _BundleWriteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
7995
7996
// Validate checks the field values on BundleWriteResponse with the rules
7997
// defined in the proto definition for this message. If any rules are
7998
// violated, the first error encountered is returned, or nil if there are no violations.
7999
func (m *BundleWriteResponse) Validate() error {
8000
	return m.validate(false)
8001
}
8002
8003
// ValidateAll checks the field values on BundleWriteResponse with the rules
8004
// defined in the proto definition for this message. If any rules are
8005
// violated, the result is a list of violation errors wrapped in
8006
// BundleWriteResponseMultiError, or nil if none found.
8007
func (m *BundleWriteResponse) ValidateAll() error {
8008
	return m.validate(true)
8009
}
8010
8011
func (m *BundleWriteResponse) validate(all bool) error {
8012
	if m == nil {
8013
		return nil
8014
	}
8015
8016
	var errors []error
8017
8018
	if len(errors) > 0 {
8019
		return BundleWriteResponseMultiError(errors)
8020
	}
8021
8022
	return nil
8023
}
8024
8025
// BundleWriteResponseMultiError is an error wrapping multiple validation
8026
// errors returned by BundleWriteResponse.ValidateAll() if the designated
8027
// constraints aren't met.
8028
type BundleWriteResponseMultiError []error
8029
8030
// Error returns a concatenation of all the error messages it wraps.
8031
func (m BundleWriteResponseMultiError) Error() string {
8032
	var msgs []string
8033
	for _, err := range m {
8034
		msgs = append(msgs, err.Error())
8035
	}
8036
	return strings.Join(msgs, "; ")
8037
}
8038
8039
// AllErrors returns a list of validation violation errors.
8040
func (m BundleWriteResponseMultiError) AllErrors() []error { return m }
8041
8042
// BundleWriteResponseValidationError is the validation error returned by
8043
// BundleWriteResponse.Validate if the designated constraints aren't met.
8044
type BundleWriteResponseValidationError struct {
8045
	field  string
8046
	reason string
8047
	cause  error
8048
	key    bool
8049
}
8050
8051
// Field function returns field value.
8052
func (e BundleWriteResponseValidationError) Field() string { return e.field }
8053
8054
// Reason function returns reason value.
8055
func (e BundleWriteResponseValidationError) Reason() string { return e.reason }
8056
8057
// Cause function returns cause value.
8058
func (e BundleWriteResponseValidationError) Cause() error { return e.cause }
8059
8060
// Key function returns key value.
8061
func (e BundleWriteResponseValidationError) Key() bool { return e.key }
8062
8063
// ErrorName returns error name.
8064
func (e BundleWriteResponseValidationError) ErrorName() string {
8065
	return "BundleWriteResponseValidationError"
8066
}
8067
8068
// Error satisfies the builtin error interface
8069
func (e BundleWriteResponseValidationError) Error() string {
8070
	cause := ""
8071
	if e.cause != nil {
8072
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8073
	}
8074
8075
	key := ""
8076
	if e.key {
8077
		key = "key for "
8078
	}
8079
8080
	return fmt.Sprintf(
8081
		"invalid %sBundleWriteResponse.%s: %s%s",
8082
		key,
8083
		e.field,
8084
		e.reason,
8085
		cause)
8086
}
8087
8088
var _ error = BundleWriteResponseValidationError{}
8089
8090
var _ interface {
8091
	Field() string
8092
	Reason() string
8093
	Key() bool
8094
	Cause() error
8095
	ErrorName() string
8096
} = BundleWriteResponseValidationError{}
8097
8098
// Validate checks the field values on BundleReadRequest with the rules defined
8099
// in the proto definition for this message. If any rules are violated, the
8100
// first error encountered is returned, or nil if there are no violations.
8101
func (m *BundleReadRequest) Validate() error {
8102
	return m.validate(false)
8103
}
8104
8105
// ValidateAll checks the field values on BundleReadRequest with the rules
8106
// defined in the proto definition for this message. If any rules are
8107
// violated, the result is a list of violation errors wrapped in
8108
// BundleReadRequestMultiError, or nil if none found.
8109
func (m *BundleReadRequest) ValidateAll() error {
8110
	return m.validate(true)
8111
}
8112
8113
func (m *BundleReadRequest) validate(all bool) error {
8114
	if m == nil {
8115
		return nil
8116
	}
8117
8118
	var errors []error
8119
8120
	if len(m.GetTenantId()) > 128 {
8121
		err := BundleReadRequestValidationError{
8122
			field:  "TenantId",
8123
			reason: "value length must be at most 128 bytes",
8124
		}
8125
		if !all {
8126
			return err
8127
		}
8128
		errors = append(errors, err)
8129
	}
8130
8131
	if !_BundleReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
8132
		err := BundleReadRequestValidationError{
8133
			field:  "TenantId",
8134
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
8135
		}
8136
		if !all {
8137
			return err
8138
		}
8139
		errors = append(errors, err)
8140
	}
8141
8142
	// no validation rules for Name
8143
8144
	if len(errors) > 0 {
8145
		return BundleReadRequestMultiError(errors)
8146
	}
8147
8148
	return nil
8149
}
8150
8151
// BundleReadRequestMultiError is an error wrapping multiple validation errors
8152
// returned by BundleReadRequest.ValidateAll() if the designated constraints
8153
// aren't met.
8154
type BundleReadRequestMultiError []error
8155
8156
// Error returns a concatenation of all the error messages it wraps.
8157
func (m BundleReadRequestMultiError) Error() string {
8158
	var msgs []string
8159
	for _, err := range m {
8160
		msgs = append(msgs, err.Error())
8161
	}
8162
	return strings.Join(msgs, "; ")
8163
}
8164
8165
// AllErrors returns a list of validation violation errors.
8166
func (m BundleReadRequestMultiError) AllErrors() []error { return m }
8167
8168
// BundleReadRequestValidationError is the validation error returned by
8169
// BundleReadRequest.Validate if the designated constraints aren't met.
8170
type BundleReadRequestValidationError struct {
8171
	field  string
8172
	reason string
8173
	cause  error
8174
	key    bool
8175
}
8176
8177
// Field function returns field value.
8178
func (e BundleReadRequestValidationError) Field() string { return e.field }
8179
8180
// Reason function returns reason value.
8181
func (e BundleReadRequestValidationError) Reason() string { return e.reason }
8182
8183
// Cause function returns cause value.
8184
func (e BundleReadRequestValidationError) Cause() error { return e.cause }
8185
8186
// Key function returns key value.
8187
func (e BundleReadRequestValidationError) Key() bool { return e.key }
8188
8189
// ErrorName returns error name.
8190
func (e BundleReadRequestValidationError) ErrorName() string {
8191
	return "BundleReadRequestValidationError"
8192
}
8193
8194
// Error satisfies the builtin error interface
8195
func (e BundleReadRequestValidationError) Error() string {
8196
	cause := ""
8197
	if e.cause != nil {
8198
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8199
	}
8200
8201
	key := ""
8202
	if e.key {
8203
		key = "key for "
8204
	}
8205
8206
	return fmt.Sprintf(
8207
		"invalid %sBundleReadRequest.%s: %s%s",
8208
		key,
8209
		e.field,
8210
		e.reason,
8211
		cause)
8212
}
8213
8214
var _ error = BundleReadRequestValidationError{}
8215
8216
var _ interface {
8217
	Field() string
8218
	Reason() string
8219
	Key() bool
8220
	Cause() error
8221
	ErrorName() string
8222
} = BundleReadRequestValidationError{}
8223
8224
var _BundleReadRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
8225
8226
// Validate checks the field values on BundleReadResponse with the rules
8227
// defined in the proto definition for this message. If any rules are
8228
// violated, the first error encountered is returned, or nil if there are no violations.
8229
func (m *BundleReadResponse) Validate() error {
8230
	return m.validate(false)
8231
}
8232
8233
// ValidateAll checks the field values on BundleReadResponse with the rules
8234
// defined in the proto definition for this message. If any rules are
8235
// violated, the result is a list of violation errors wrapped in
8236
// BundleReadResponseMultiError, or nil if none found.
8237
func (m *BundleReadResponse) ValidateAll() error {
8238
	return m.validate(true)
8239
}
8240
8241
func (m *BundleReadResponse) validate(all bool) error {
8242
	if m == nil {
8243
		return nil
8244
	}
8245
8246
	var errors []error
8247
8248
	if all {
8249
		switch v := interface{}(m.GetBundle()).(type) {
8250
		case interface{ ValidateAll() error }:
8251
			if err := v.ValidateAll(); err != nil {
8252
				errors = append(errors, BundleReadResponseValidationError{
8253
					field:  "Bundle",
8254
					reason: "embedded message failed validation",
8255
					cause:  err,
8256
				})
8257
			}
8258
		case interface{ Validate() error }:
8259
			if err := v.Validate(); err != nil {
8260
				errors = append(errors, BundleReadResponseValidationError{
8261
					field:  "Bundle",
8262
					reason: "embedded message failed validation",
8263
					cause:  err,
8264
				})
8265
			}
8266
		}
8267
	} else if v, ok := interface{}(m.GetBundle()).(interface{ Validate() error }); ok {
8268
		if err := v.Validate(); err != nil {
8269
			return BundleReadResponseValidationError{
8270
				field:  "Bundle",
8271
				reason: "embedded message failed validation",
8272
				cause:  err,
8273
			}
8274
		}
8275
	}
8276
8277
	if len(errors) > 0 {
8278
		return BundleReadResponseMultiError(errors)
8279
	}
8280
8281
	return nil
8282
}
8283
8284
// BundleReadResponseMultiError is an error wrapping multiple validation errors
8285
// returned by BundleReadResponse.ValidateAll() if the designated constraints
8286
// aren't met.
8287
type BundleReadResponseMultiError []error
8288
8289
// Error returns a concatenation of all the error messages it wraps.
8290
func (m BundleReadResponseMultiError) Error() string {
8291
	var msgs []string
8292
	for _, err := range m {
8293
		msgs = append(msgs, err.Error())
8294
	}
8295
	return strings.Join(msgs, "; ")
8296
}
8297
8298
// AllErrors returns a list of validation violation errors.
8299
func (m BundleReadResponseMultiError) AllErrors() []error { return m }
8300
8301
// BundleReadResponseValidationError is the validation error returned by
8302
// BundleReadResponse.Validate if the designated constraints aren't met.
8303
type BundleReadResponseValidationError struct {
8304
	field  string
8305
	reason string
8306
	cause  error
8307
	key    bool
8308
}
8309
8310
// Field function returns field value.
8311
func (e BundleReadResponseValidationError) Field() string { return e.field }
8312
8313
// Reason function returns reason value.
8314
func (e BundleReadResponseValidationError) Reason() string { return e.reason }
8315
8316
// Cause function returns cause value.
8317
func (e BundleReadResponseValidationError) Cause() error { return e.cause }
8318
8319
// Key function returns key value.
8320
func (e BundleReadResponseValidationError) Key() bool { return e.key }
8321
8322
// ErrorName returns error name.
8323
func (e BundleReadResponseValidationError) ErrorName() string {
8324
	return "BundleReadResponseValidationError"
8325
}
8326
8327
// Error satisfies the builtin error interface
8328
func (e BundleReadResponseValidationError) Error() string {
8329
	cause := ""
8330
	if e.cause != nil {
8331
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8332
	}
8333
8334
	key := ""
8335
	if e.key {
8336
		key = "key for "
8337
	}
8338
8339
	return fmt.Sprintf(
8340
		"invalid %sBundleReadResponse.%s: %s%s",
8341
		key,
8342
		e.field,
8343
		e.reason,
8344
		cause)
8345
}
8346
8347
var _ error = BundleReadResponseValidationError{}
8348
8349
var _ interface {
8350
	Field() string
8351
	Reason() string
8352
	Key() bool
8353
	Cause() error
8354
	ErrorName() string
8355
} = BundleReadResponseValidationError{}
8356
8357
// Validate checks the field values on BundleDeleteRequest with the rules
8358
// defined in the proto definition for this message. If any rules are
8359
// violated, the first error encountered is returned, or nil if there are no violations.
8360
func (m *BundleDeleteRequest) Validate() error {
8361
	return m.validate(false)
8362
}
8363
8364
// ValidateAll checks the field values on BundleDeleteRequest with the rules
8365
// defined in the proto definition for this message. If any rules are
8366
// violated, the result is a list of violation errors wrapped in
8367
// BundleDeleteRequestMultiError, or nil if none found.
8368
func (m *BundleDeleteRequest) ValidateAll() error {
8369
	return m.validate(true)
8370
}
8371
8372
func (m *BundleDeleteRequest) validate(all bool) error {
8373
	if m == nil {
8374
		return nil
8375
	}
8376
8377
	var errors []error
8378
8379
	if len(m.GetTenantId()) > 128 {
8380
		err := BundleDeleteRequestValidationError{
8381
			field:  "TenantId",
8382
			reason: "value length must be at most 128 bytes",
8383
		}
8384
		if !all {
8385
			return err
8386
		}
8387
		errors = append(errors, err)
8388
	}
8389
8390
	if !_BundleDeleteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) {
8391
		err := BundleDeleteRequestValidationError{
8392
			field:  "TenantId",
8393
			reason: "value does not match regex pattern \"^([a-zA-Z0-9_\\\\-@\\\\.:+]{1,128}|\\\\*)$\"",
8394
		}
8395
		if !all {
8396
			return err
8397
		}
8398
		errors = append(errors, err)
8399
	}
8400
8401
	// no validation rules for Name
8402
8403
	if len(errors) > 0 {
8404
		return BundleDeleteRequestMultiError(errors)
8405
	}
8406
8407
	return nil
8408
}
8409
8410
// BundleDeleteRequestMultiError is an error wrapping multiple validation
8411
// errors returned by BundleDeleteRequest.ValidateAll() if the designated
8412
// constraints aren't met.
8413
type BundleDeleteRequestMultiError []error
8414
8415
// Error returns a concatenation of all the error messages it wraps.
8416
func (m BundleDeleteRequestMultiError) Error() string {
8417
	var msgs []string
8418
	for _, err := range m {
8419
		msgs = append(msgs, err.Error())
8420
	}
8421
	return strings.Join(msgs, "; ")
8422
}
8423
8424
// AllErrors returns a list of validation violation errors.
8425
func (m BundleDeleteRequestMultiError) AllErrors() []error { return m }
8426
8427
// BundleDeleteRequestValidationError is the validation error returned by
8428
// BundleDeleteRequest.Validate if the designated constraints aren't met.
8429
type BundleDeleteRequestValidationError struct {
8430
	field  string
8431
	reason string
8432
	cause  error
8433
	key    bool
8434
}
8435
8436
// Field function returns field value.
8437
func (e BundleDeleteRequestValidationError) Field() string { return e.field }
8438
8439
// Reason function returns reason value.
8440
func (e BundleDeleteRequestValidationError) Reason() string { return e.reason }
8441
8442
// Cause function returns cause value.
8443
func (e BundleDeleteRequestValidationError) Cause() error { return e.cause }
8444
8445
// Key function returns key value.
8446
func (e BundleDeleteRequestValidationError) Key() bool { return e.key }
8447
8448
// ErrorName returns error name.
8449
func (e BundleDeleteRequestValidationError) ErrorName() string {
8450
	return "BundleDeleteRequestValidationError"
8451
}
8452
8453
// Error satisfies the builtin error interface
8454
func (e BundleDeleteRequestValidationError) Error() string {
8455
	cause := ""
8456
	if e.cause != nil {
8457
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8458
	}
8459
8460
	key := ""
8461
	if e.key {
8462
		key = "key for "
8463
	}
8464
8465
	return fmt.Sprintf(
8466
		"invalid %sBundleDeleteRequest.%s: %s%s",
8467
		key,
8468
		e.field,
8469
		e.reason,
8470
		cause)
8471
}
8472
8473
var _ error = BundleDeleteRequestValidationError{}
8474
8475
var _ interface {
8476
	Field() string
8477
	Reason() string
8478
	Key() bool
8479
	Cause() error
8480
	ErrorName() string
8481
} = BundleDeleteRequestValidationError{}
8482
8483
var _BundleDeleteRequest_TenantId_Pattern = regexp.MustCompile("^([a-zA-Z0-9_\\-@\\.:+]{1,128}|\\*)$")
8484
8485
// Validate checks the field values on BundleDeleteResponse with the rules
8486
// defined in the proto definition for this message. If any rules are
8487
// violated, the first error encountered is returned, or nil if there are no violations.
8488
func (m *BundleDeleteResponse) Validate() error {
8489
	return m.validate(false)
8490
}
8491
8492
// ValidateAll checks the field values on BundleDeleteResponse with the rules
8493
// defined in the proto definition for this message. If any rules are
8494
// violated, the result is a list of violation errors wrapped in
8495
// BundleDeleteResponseMultiError, or nil if none found.
8496
func (m *BundleDeleteResponse) ValidateAll() error {
8497
	return m.validate(true)
8498
}
8499
8500
func (m *BundleDeleteResponse) validate(all bool) error {
8501
	if m == nil {
8502
		return nil
8503
	}
8504
8505
	var errors []error
8506
8507
	// no validation rules for Name
8508
8509
	if len(errors) > 0 {
8510
		return BundleDeleteResponseMultiError(errors)
8511
	}
8512
8513
	return nil
8514
}
8515
8516
// BundleDeleteResponseMultiError is an error wrapping multiple validation
8517
// errors returned by BundleDeleteResponse.ValidateAll() if the designated
8518
// constraints aren't met.
8519
type BundleDeleteResponseMultiError []error
8520
8521
// Error returns a concatenation of all the error messages it wraps.
8522
func (m BundleDeleteResponseMultiError) Error() string {
8523
	var msgs []string
8524
	for _, err := range m {
8525
		msgs = append(msgs, err.Error())
8526
	}
8527
	return strings.Join(msgs, "; ")
8528
}
8529
8530
// AllErrors returns a list of validation violation errors.
8531
func (m BundleDeleteResponseMultiError) AllErrors() []error { return m }
8532
8533
// BundleDeleteResponseValidationError is the validation error returned by
8534
// BundleDeleteResponse.Validate if the designated constraints aren't met.
8535
type BundleDeleteResponseValidationError struct {
8536
	field  string
8537
	reason string
8538
	cause  error
8539
	key    bool
8540
}
8541
8542
// Field function returns field value.
8543
func (e BundleDeleteResponseValidationError) Field() string { return e.field }
8544
8545
// Reason function returns reason value.
8546
func (e BundleDeleteResponseValidationError) Reason() string { return e.reason }
8547
8548
// Cause function returns cause value.
8549
func (e BundleDeleteResponseValidationError) Cause() error { return e.cause }
8550
8551
// Key function returns key value.
8552
func (e BundleDeleteResponseValidationError) Key() bool { return e.key }
8553
8554
// ErrorName returns error name.
8555
func (e BundleDeleteResponseValidationError) ErrorName() string {
8556
	return "BundleDeleteResponseValidationError"
8557
}
8558
8559
// Error satisfies the builtin error interface
8560
func (e BundleDeleteResponseValidationError) Error() string {
8561
	cause := ""
8562
	if e.cause != nil {
8563
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8564
	}
8565
8566
	key := ""
8567
	if e.key {
8568
		key = "key for "
8569
	}
8570
8571
	return fmt.Sprintf(
8572
		"invalid %sBundleDeleteResponse.%s: %s%s",
8573
		key,
8574
		e.field,
8575
		e.reason,
8576
		cause)
8577
}
8578
8579
var _ error = BundleDeleteResponseValidationError{}
8580
8581
var _ interface {
8582
	Field() string
8583
	Reason() string
8584
	Key() bool
8585
	Cause() error
8586
	ErrorName() string
8587
} = BundleDeleteResponseValidationError{}
8588
8589
// Validate checks the field values on TenantCreateRequest with the rules
8590
// defined in the proto definition for this message. If any rules are
8591
// violated, the first error encountered is returned, or nil if there are no violations.
8592
func (m *TenantCreateRequest) Validate() error {
8593
	return m.validate(false)
8594
}
8595
8596
// ValidateAll checks the field values on TenantCreateRequest with the rules
8597
// defined in the proto definition for this message. If any rules are
8598
// violated, the result is a list of violation errors wrapped in
8599
// TenantCreateRequestMultiError, or nil if none found.
8600
func (m *TenantCreateRequest) ValidateAll() error {
8601
	return m.validate(true)
8602
}
8603
8604
func (m *TenantCreateRequest) validate(all bool) error {
8605
	if m == nil {
8606
		return nil
8607
	}
8608
8609
	var errors []error
8610
8611
	if len(m.GetId()) > 64 {
8612
		err := TenantCreateRequestValidationError{
8613
			field:  "Id",
8614
			reason: "value length must be at most 64 bytes",
8615
		}
8616
		if !all {
8617
			return err
8618
		}
8619
		errors = append(errors, err)
8620
	}
8621
8622
	if !_TenantCreateRequest_Id_Pattern.MatchString(m.GetId()) {
8623
		err := TenantCreateRequestValidationError{
8624
			field:  "Id",
8625
			reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"",
8626
		}
8627
		if !all {
8628
			return err
8629
		}
8630
		errors = append(errors, err)
8631
	}
8632
8633
	if len(m.GetName()) > 64 {
8634
		err := TenantCreateRequestValidationError{
8635
			field:  "Name",
8636
			reason: "value length must be at most 64 bytes",
8637
		}
8638
		if !all {
8639
			return err
8640
		}
8641
		errors = append(errors, err)
8642
	}
8643
8644
	if len(errors) > 0 {
8645
		return TenantCreateRequestMultiError(errors)
8646
	}
8647
8648
	return nil
8649
}
8650
8651
// TenantCreateRequestMultiError is an error wrapping multiple validation
8652
// errors returned by TenantCreateRequest.ValidateAll() if the designated
8653
// constraints aren't met.
8654
type TenantCreateRequestMultiError []error
8655
8656
// Error returns a concatenation of all the error messages it wraps.
8657
func (m TenantCreateRequestMultiError) Error() string {
8658
	var msgs []string
8659
	for _, err := range m {
8660
		msgs = append(msgs, err.Error())
8661
	}
8662
	return strings.Join(msgs, "; ")
8663
}
8664
8665
// AllErrors returns a list of validation violation errors.
8666
func (m TenantCreateRequestMultiError) AllErrors() []error { return m }
8667
8668
// TenantCreateRequestValidationError is the validation error returned by
8669
// TenantCreateRequest.Validate if the designated constraints aren't met.
8670
type TenantCreateRequestValidationError struct {
8671
	field  string
8672
	reason string
8673
	cause  error
8674
	key    bool
8675
}
8676
8677
// Field function returns field value.
8678
func (e TenantCreateRequestValidationError) Field() string { return e.field }
8679
8680
// Reason function returns reason value.
8681
func (e TenantCreateRequestValidationError) Reason() string { return e.reason }
8682
8683
// Cause function returns cause value.
8684
func (e TenantCreateRequestValidationError) Cause() error { return e.cause }
8685
8686
// Key function returns key value.
8687
func (e TenantCreateRequestValidationError) Key() bool { return e.key }
8688
8689
// ErrorName returns error name.
8690
func (e TenantCreateRequestValidationError) ErrorName() string {
8691
	return "TenantCreateRequestValidationError"
8692
}
8693
8694
// Error satisfies the builtin error interface
8695
func (e TenantCreateRequestValidationError) Error() string {
8696
	cause := ""
8697
	if e.cause != nil {
8698
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8699
	}
8700
8701
	key := ""
8702
	if e.key {
8703
		key = "key for "
8704
	}
8705
8706
	return fmt.Sprintf(
8707
		"invalid %sTenantCreateRequest.%s: %s%s",
8708
		key,
8709
		e.field,
8710
		e.reason,
8711
		cause)
8712
}
8713
8714
var _ error = TenantCreateRequestValidationError{}
8715
8716
var _ interface {
8717
	Field() string
8718
	Reason() string
8719
	Key() bool
8720
	Cause() error
8721
	ErrorName() string
8722
} = TenantCreateRequestValidationError{}
8723
8724
var _TenantCreateRequest_Id_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+")
8725
8726
// Validate checks the field values on TenantCreateResponse with the rules
8727
// defined in the proto definition for this message. If any rules are
8728
// violated, the first error encountered is returned, or nil if there are no violations.
8729
func (m *TenantCreateResponse) Validate() error {
8730
	return m.validate(false)
8731
}
8732
8733
// ValidateAll checks the field values on TenantCreateResponse with the rules
8734
// defined in the proto definition for this message. If any rules are
8735
// violated, the result is a list of violation errors wrapped in
8736
// TenantCreateResponseMultiError, or nil if none found.
8737
func (m *TenantCreateResponse) ValidateAll() error {
8738
	return m.validate(true)
8739
}
8740
8741
func (m *TenantCreateResponse) validate(all bool) error {
8742
	if m == nil {
8743
		return nil
8744
	}
8745
8746
	var errors []error
8747
8748
	if all {
8749
		switch v := interface{}(m.GetTenant()).(type) {
8750
		case interface{ ValidateAll() error }:
8751
			if err := v.ValidateAll(); err != nil {
8752
				errors = append(errors, TenantCreateResponseValidationError{
8753
					field:  "Tenant",
8754
					reason: "embedded message failed validation",
8755
					cause:  err,
8756
				})
8757
			}
8758
		case interface{ Validate() error }:
8759
			if err := v.Validate(); err != nil {
8760
				errors = append(errors, TenantCreateResponseValidationError{
8761
					field:  "Tenant",
8762
					reason: "embedded message failed validation",
8763
					cause:  err,
8764
				})
8765
			}
8766
		}
8767
	} else if v, ok := interface{}(m.GetTenant()).(interface{ Validate() error }); ok {
8768
		if err := v.Validate(); err != nil {
8769
			return TenantCreateResponseValidationError{
8770
				field:  "Tenant",
8771
				reason: "embedded message failed validation",
8772
				cause:  err,
8773
			}
8774
		}
8775
	}
8776
8777
	if len(errors) > 0 {
8778
		return TenantCreateResponseMultiError(errors)
8779
	}
8780
8781
	return nil
8782
}
8783
8784
// TenantCreateResponseMultiError is an error wrapping multiple validation
8785
// errors returned by TenantCreateResponse.ValidateAll() if the designated
8786
// constraints aren't met.
8787
type TenantCreateResponseMultiError []error
8788
8789
// Error returns a concatenation of all the error messages it wraps.
8790
func (m TenantCreateResponseMultiError) Error() string {
8791
	var msgs []string
8792
	for _, err := range m {
8793
		msgs = append(msgs, err.Error())
8794
	}
8795
	return strings.Join(msgs, "; ")
8796
}
8797
8798
// AllErrors returns a list of validation violation errors.
8799
func (m TenantCreateResponseMultiError) AllErrors() []error { return m }
8800
8801
// TenantCreateResponseValidationError is the validation error returned by
8802
// TenantCreateResponse.Validate if the designated constraints aren't met.
8803
type TenantCreateResponseValidationError struct {
8804
	field  string
8805
	reason string
8806
	cause  error
8807
	key    bool
8808
}
8809
8810
// Field function returns field value.
8811
func (e TenantCreateResponseValidationError) Field() string { return e.field }
8812
8813
// Reason function returns reason value.
8814
func (e TenantCreateResponseValidationError) Reason() string { return e.reason }
8815
8816
// Cause function returns cause value.
8817
func (e TenantCreateResponseValidationError) Cause() error { return e.cause }
8818
8819
// Key function returns key value.
8820
func (e TenantCreateResponseValidationError) Key() bool { return e.key }
8821
8822
// ErrorName returns error name.
8823
func (e TenantCreateResponseValidationError) ErrorName() string {
8824
	return "TenantCreateResponseValidationError"
8825
}
8826
8827
// Error satisfies the builtin error interface
8828
func (e TenantCreateResponseValidationError) Error() string {
8829
	cause := ""
8830
	if e.cause != nil {
8831
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8832
	}
8833
8834
	key := ""
8835
	if e.key {
8836
		key = "key for "
8837
	}
8838
8839
	return fmt.Sprintf(
8840
		"invalid %sTenantCreateResponse.%s: %s%s",
8841
		key,
8842
		e.field,
8843
		e.reason,
8844
		cause)
8845
}
8846
8847
var _ error = TenantCreateResponseValidationError{}
8848
8849
var _ interface {
8850
	Field() string
8851
	Reason() string
8852
	Key() bool
8853
	Cause() error
8854
	ErrorName() string
8855
} = TenantCreateResponseValidationError{}
8856
8857
// Validate checks the field values on TenantDeleteRequest with the rules
8858
// defined in the proto definition for this message. If any rules are
8859
// violated, the first error encountered is returned, or nil if there are no violations.
8860
func (m *TenantDeleteRequest) Validate() error {
8861
	return m.validate(false)
8862
}
8863
8864
// ValidateAll checks the field values on TenantDeleteRequest with the rules
8865
// defined in the proto definition for this message. If any rules are
8866
// violated, the result is a list of violation errors wrapped in
8867
// TenantDeleteRequestMultiError, or nil if none found.
8868
func (m *TenantDeleteRequest) ValidateAll() error {
8869
	return m.validate(true)
8870
}
8871
8872
func (m *TenantDeleteRequest) validate(all bool) error {
8873
	if m == nil {
8874
		return nil
8875
	}
8876
8877
	var errors []error
8878
8879
	if len(errors) > 0 {
8880
		return TenantDeleteRequestMultiError(errors)
8881
	}
8882
8883
	return nil
8884
}
8885
8886
// TenantDeleteRequestMultiError is an error wrapping multiple validation
8887
// errors returned by TenantDeleteRequest.ValidateAll() if the designated
8888
// constraints aren't met.
8889
type TenantDeleteRequestMultiError []error
8890
8891
// Error returns a concatenation of all the error messages it wraps.
8892
func (m TenantDeleteRequestMultiError) Error() string {
8893
	var msgs []string
8894
	for _, err := range m {
8895
		msgs = append(msgs, err.Error())
8896
	}
8897
	return strings.Join(msgs, "; ")
8898
}
8899
8900
// AllErrors returns a list of validation violation errors.
8901
func (m TenantDeleteRequestMultiError) AllErrors() []error { return m }
8902
8903
// TenantDeleteRequestValidationError is the validation error returned by
8904
// TenantDeleteRequest.Validate if the designated constraints aren't met.
8905
type TenantDeleteRequestValidationError struct {
8906
	field  string
8907
	reason string
8908
	cause  error
8909
	key    bool
8910
}
8911
8912
// Field function returns field value.
8913
func (e TenantDeleteRequestValidationError) Field() string { return e.field }
8914
8915
// Reason function returns reason value.
8916
func (e TenantDeleteRequestValidationError) Reason() string { return e.reason }
8917
8918
// Cause function returns cause value.
8919
func (e TenantDeleteRequestValidationError) Cause() error { return e.cause }
8920
8921
// Key function returns key value.
8922
func (e TenantDeleteRequestValidationError) Key() bool { return e.key }
8923
8924
// ErrorName returns error name.
8925
func (e TenantDeleteRequestValidationError) ErrorName() string {
8926
	return "TenantDeleteRequestValidationError"
8927
}
8928
8929
// Error satisfies the builtin error interface
8930
func (e TenantDeleteRequestValidationError) Error() string {
8931
	cause := ""
8932
	if e.cause != nil {
8933
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
8934
	}
8935
8936
	key := ""
8937
	if e.key {
8938
		key = "key for "
8939
	}
8940
8941
	return fmt.Sprintf(
8942
		"invalid %sTenantDeleteRequest.%s: %s%s",
8943
		key,
8944
		e.field,
8945
		e.reason,
8946
		cause)
8947
}
8948
8949
var _ error = TenantDeleteRequestValidationError{}
8950
8951
var _ interface {
8952
	Field() string
8953
	Reason() string
8954
	Key() bool
8955
	Cause() error
8956
	ErrorName() string
8957
} = TenantDeleteRequestValidationError{}
8958
8959
// Validate checks the field values on TenantDeleteResponse with the rules
8960
// defined in the proto definition for this message. If any rules are
8961
// violated, the first error encountered is returned, or nil if there are no violations.
8962
func (m *TenantDeleteResponse) Validate() error {
8963
	return m.validate(false)
8964
}
8965
8966
// ValidateAll checks the field values on TenantDeleteResponse with the rules
8967
// defined in the proto definition for this message. If any rules are
8968
// violated, the result is a list of violation errors wrapped in
8969
// TenantDeleteResponseMultiError, or nil if none found.
8970
func (m *TenantDeleteResponse) ValidateAll() error {
8971
	return m.validate(true)
8972
}
8973
8974
func (m *TenantDeleteResponse) validate(all bool) error {
8975
	if m == nil {
8976
		return nil
8977
	}
8978
8979
	var errors []error
8980
8981
	if all {
8982
		switch v := interface{}(m.GetTenant()).(type) {
8983
		case interface{ ValidateAll() error }:
8984
			if err := v.ValidateAll(); err != nil {
8985
				errors = append(errors, TenantDeleteResponseValidationError{
8986
					field:  "Tenant",
8987
					reason: "embedded message failed validation",
8988
					cause:  err,
8989
				})
8990
			}
8991
		case interface{ Validate() error }:
8992
			if err := v.Validate(); err != nil {
8993
				errors = append(errors, TenantDeleteResponseValidationError{
8994
					field:  "Tenant",
8995
					reason: "embedded message failed validation",
8996
					cause:  err,
8997
				})
8998
			}
8999
		}
9000
	} else if v, ok := interface{}(m.GetTenant()).(interface{ Validate() error }); ok {
9001
		if err := v.Validate(); err != nil {
9002
			return TenantDeleteResponseValidationError{
9003
				field:  "Tenant",
9004
				reason: "embedded message failed validation",
9005
				cause:  err,
9006
			}
9007
		}
9008
	}
9009
9010
	if len(errors) > 0 {
9011
		return TenantDeleteResponseMultiError(errors)
9012
	}
9013
9014
	return nil
9015
}
9016
9017
// TenantDeleteResponseMultiError is an error wrapping multiple validation
9018
// errors returned by TenantDeleteResponse.ValidateAll() if the designated
9019
// constraints aren't met.
9020
type TenantDeleteResponseMultiError []error
9021
9022
// Error returns a concatenation of all the error messages it wraps.
9023
func (m TenantDeleteResponseMultiError) Error() string {
9024
	var msgs []string
9025
	for _, err := range m {
9026
		msgs = append(msgs, err.Error())
9027
	}
9028
	return strings.Join(msgs, "; ")
9029
}
9030
9031
// AllErrors returns a list of validation violation errors.
9032
func (m TenantDeleteResponseMultiError) AllErrors() []error { return m }
9033
9034
// TenantDeleteResponseValidationError is the validation error returned by
9035
// TenantDeleteResponse.Validate if the designated constraints aren't met.
9036
type TenantDeleteResponseValidationError struct {
9037
	field  string
9038
	reason string
9039
	cause  error
9040
	key    bool
9041
}
9042
9043
// Field function returns field value.
9044
func (e TenantDeleteResponseValidationError) Field() string { return e.field }
9045
9046
// Reason function returns reason value.
9047
func (e TenantDeleteResponseValidationError) Reason() string { return e.reason }
9048
9049
// Cause function returns cause value.
9050
func (e TenantDeleteResponseValidationError) Cause() error { return e.cause }
9051
9052
// Key function returns key value.
9053
func (e TenantDeleteResponseValidationError) Key() bool { return e.key }
9054
9055
// ErrorName returns error name.
9056
func (e TenantDeleteResponseValidationError) ErrorName() string {
9057
	return "TenantDeleteResponseValidationError"
9058
}
9059
9060
// Error satisfies the builtin error interface
9061
func (e TenantDeleteResponseValidationError) Error() string {
9062
	cause := ""
9063
	if e.cause != nil {
9064
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
9065
	}
9066
9067
	key := ""
9068
	if e.key {
9069
		key = "key for "
9070
	}
9071
9072
	return fmt.Sprintf(
9073
		"invalid %sTenantDeleteResponse.%s: %s%s",
9074
		key,
9075
		e.field,
9076
		e.reason,
9077
		cause)
9078
}
9079
9080
var _ error = TenantDeleteResponseValidationError{}
9081
9082
var _ interface {
9083
	Field() string
9084
	Reason() string
9085
	Key() bool
9086
	Cause() error
9087
	ErrorName() string
9088
} = TenantDeleteResponseValidationError{}
9089
9090
// Validate checks the field values on TenantListRequest with the rules defined
9091
// in the proto definition for this message. If any rules are violated, the
9092
// first error encountered is returned, or nil if there are no violations.
9093
func (m *TenantListRequest) Validate() error {
9094
	return m.validate(false)
9095
}
9096
9097
// ValidateAll checks the field values on TenantListRequest with the rules
9098
// defined in the proto definition for this message. If any rules are
9099
// violated, the result is a list of violation errors wrapped in
9100
// TenantListRequestMultiError, or nil if none found.
9101
func (m *TenantListRequest) ValidateAll() error {
9102
	return m.validate(true)
9103
}
9104
9105
func (m *TenantListRequest) validate(all bool) error {
9106
	if m == nil {
9107
		return nil
9108
	}
9109
9110
	var errors []error
9111
9112
	if m.GetPageSize() != 0 {
9113
9114
		if val := m.GetPageSize(); val < 1 || val > 100 {
9115
			err := TenantListRequestValidationError{
9116
				field:  "PageSize",
9117
				reason: "value must be inside range [1, 100]",
9118
			}
9119
			if !all {
9120
				return err
9121
			}
9122
			errors = append(errors, err)
9123
		}
9124
9125
	}
9126
9127
	if m.GetContinuousToken() != "" {
9128
9129
	}
9130
9131
	if len(errors) > 0 {
9132
		return TenantListRequestMultiError(errors)
9133
	}
9134
9135
	return nil
9136
}
9137
9138
// TenantListRequestMultiError is an error wrapping multiple validation errors
9139
// returned by TenantListRequest.ValidateAll() if the designated constraints
9140
// aren't met.
9141
type TenantListRequestMultiError []error
9142
9143
// Error returns a concatenation of all the error messages it wraps.
9144
func (m TenantListRequestMultiError) Error() string {
9145
	var msgs []string
9146
	for _, err := range m {
9147
		msgs = append(msgs, err.Error())
9148
	}
9149
	return strings.Join(msgs, "; ")
9150
}
9151
9152
// AllErrors returns a list of validation violation errors.
9153
func (m TenantListRequestMultiError) AllErrors() []error { return m }
9154
9155
// TenantListRequestValidationError is the validation error returned by
9156
// TenantListRequest.Validate if the designated constraints aren't met.
9157
type TenantListRequestValidationError struct {
9158
	field  string
9159
	reason string
9160
	cause  error
9161
	key    bool
9162
}
9163
9164
// Field function returns field value.
9165
func (e TenantListRequestValidationError) Field() string { return e.field }
9166
9167
// Reason function returns reason value.
9168
func (e TenantListRequestValidationError) Reason() string { return e.reason }
9169
9170
// Cause function returns cause value.
9171
func (e TenantListRequestValidationError) Cause() error { return e.cause }
9172
9173
// Key function returns key value.
9174
func (e TenantListRequestValidationError) Key() bool { return e.key }
9175
9176
// ErrorName returns error name.
9177
func (e TenantListRequestValidationError) ErrorName() string {
9178
	return "TenantListRequestValidationError"
9179
}
9180
9181
// Error satisfies the builtin error interface
9182
func (e TenantListRequestValidationError) Error() string {
9183
	cause := ""
9184
	if e.cause != nil {
9185
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
9186
	}
9187
9188
	key := ""
9189
	if e.key {
9190
		key = "key for "
9191
	}
9192
9193
	return fmt.Sprintf(
9194
		"invalid %sTenantListRequest.%s: %s%s",
9195
		key,
9196
		e.field,
9197
		e.reason,
9198
		cause)
9199
}
9200
9201
var _ error = TenantListRequestValidationError{}
9202
9203
var _ interface {
9204
	Field() string
9205
	Reason() string
9206
	Key() bool
9207
	Cause() error
9208
	ErrorName() string
9209
} = TenantListRequestValidationError{}
9210
9211
// Validate checks the field values on TenantListResponse with the rules
9212
// defined in the proto definition for this message. If any rules are
9213
// violated, the first error encountered is returned, or nil if there are no violations.
9214
func (m *TenantListResponse) Validate() error {
9215
	return m.validate(false)
9216
}
9217
9218
// ValidateAll checks the field values on TenantListResponse with the rules
9219
// defined in the proto definition for this message. If any rules are
9220
// violated, the result is a list of violation errors wrapped in
9221
// TenantListResponseMultiError, or nil if none found.
9222
func (m *TenantListResponse) ValidateAll() error {
9223
	return m.validate(true)
9224
}
9225
9226
func (m *TenantListResponse) validate(all bool) error {
9227
	if m == nil {
9228
		return nil
9229
	}
9230
9231
	var errors []error
9232
9233
	for idx, item := range m.GetTenants() {
9234
		_, _ = idx, item
9235
9236
		if all {
9237
			switch v := interface{}(item).(type) {
9238
			case interface{ ValidateAll() error }:
9239
				if err := v.ValidateAll(); err != nil {
9240
					errors = append(errors, TenantListResponseValidationError{
9241
						field:  fmt.Sprintf("Tenants[%v]", idx),
9242
						reason: "embedded message failed validation",
9243
						cause:  err,
9244
					})
9245
				}
9246
			case interface{ Validate() error }:
9247
				if err := v.Validate(); err != nil {
9248
					errors = append(errors, TenantListResponseValidationError{
9249
						field:  fmt.Sprintf("Tenants[%v]", idx),
9250
						reason: "embedded message failed validation",
9251
						cause:  err,
9252
					})
9253
				}
9254
			}
9255
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
9256
			if err := v.Validate(); err != nil {
9257
				return TenantListResponseValidationError{
9258
					field:  fmt.Sprintf("Tenants[%v]", idx),
9259
					reason: "embedded message failed validation",
9260
					cause:  err,
9261
				}
9262
			}
9263
		}
9264
9265
	}
9266
9267
	// no validation rules for ContinuousToken
9268
9269
	if len(errors) > 0 {
9270
		return TenantListResponseMultiError(errors)
9271
	}
9272
9273
	return nil
9274
}
9275
9276
// TenantListResponseMultiError is an error wrapping multiple validation errors
9277
// returned by TenantListResponse.ValidateAll() if the designated constraints
9278
// aren't met.
9279
type TenantListResponseMultiError []error
9280
9281
// Error returns a concatenation of all the error messages it wraps.
9282
func (m TenantListResponseMultiError) Error() string {
9283
	var msgs []string
9284
	for _, err := range m {
9285
		msgs = append(msgs, err.Error())
9286
	}
9287
	return strings.Join(msgs, "; ")
9288
}
9289
9290
// AllErrors returns a list of validation violation errors.
9291
func (m TenantListResponseMultiError) AllErrors() []error { return m }
9292
9293
// TenantListResponseValidationError is the validation error returned by
9294
// TenantListResponse.Validate if the designated constraints aren't met.
9295
type TenantListResponseValidationError struct {
9296
	field  string
9297
	reason string
9298
	cause  error
9299
	key    bool
9300
}
9301
9302
// Field function returns field value.
9303
func (e TenantListResponseValidationError) Field() string { return e.field }
9304
9305
// Reason function returns reason value.
9306
func (e TenantListResponseValidationError) Reason() string { return e.reason }
9307
9308
// Cause function returns cause value.
9309
func (e TenantListResponseValidationError) Cause() error { return e.cause }
9310
9311
// Key function returns key value.
9312
func (e TenantListResponseValidationError) Key() bool { return e.key }
9313
9314
// ErrorName returns error name.
9315
func (e TenantListResponseValidationError) ErrorName() string {
9316
	return "TenantListResponseValidationError"
9317
}
9318
9319
// Error satisfies the builtin error interface
9320
func (e TenantListResponseValidationError) Error() string {
9321
	cause := ""
9322
	if e.cause != nil {
9323
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
9324
	}
9325
9326
	key := ""
9327
	if e.key {
9328
		key = "key for "
9329
	}
9330
9331
	return fmt.Sprintf(
9332
		"invalid %sTenantListResponse.%s: %s%s",
9333
		key,
9334
		e.field,
9335
		e.reason,
9336
		cause)
9337
}
9338
9339
var _ error = TenantListResponseValidationError{}
9340
9341
var _ interface {
9342
	Field() string
9343
	Reason() string
9344
	Key() bool
9345
	Cause() error
9346
	ErrorName() string
9347
} = TenantListResponseValidationError{}
9348