Virtru policy.subjectmapping.SubjectMappingService API
The policy.subjectmapping.SubjectMappingService API from Virtru — 12 operation(s) for policy.subjectmapping.subjectmappingservice.
The policy.subjectmapping.SubjectMappingService API from Virtru — 12 operation(s) for policy.subjectmapping.subjectmappingservice.
openapi: 3.1.0
info:
title: authorization authorization.AuthorizationService policy.subjectmapping.SubjectMappingService API
security: []
tags:
- name: policy.subjectmapping.SubjectMappingService
paths:
/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: MatchSubjectMappings
description: Find matching Subject Mappings for a given Subject
operationId: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.MatchSubjectMappingsRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.MatchSubjectMappingsResponse'
/policy.subjectmapping.SubjectMappingService/ListSubjectMappings:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: ListSubjectMappings
operationId: policy.subjectmapping.SubjectMappingService.ListSubjectMappings
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.ListSubjectMappingsRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.ListSubjectMappingsResponse'
/policy.subjectmapping.SubjectMappingService/GetSubjectMapping:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: GetSubjectMapping
operationId: policy.subjectmapping.SubjectMappingService.GetSubjectMapping
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.GetSubjectMappingRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.GetSubjectMappingResponse'
/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: CreateSubjectMapping
operationId: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.CreateSubjectMappingRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.CreateSubjectMappingResponse'
/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: UpdateSubjectMapping
operationId: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.UpdateSubjectMappingRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.UpdateSubjectMappingResponse'
/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: DeleteSubjectMapping
operationId: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteSubjectMappingRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteSubjectMappingResponse'
/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: ListSubjectConditionSets
operationId: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.ListSubjectConditionSetsRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.ListSubjectConditionSetsResponse'
/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: GetSubjectConditionSet
operationId: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.GetSubjectConditionSetRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.GetSubjectConditionSetResponse'
/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: CreateSubjectConditionSet
operationId: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.CreateSubjectConditionSetRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.CreateSubjectConditionSetResponse'
/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: UpdateSubjectConditionSet
operationId: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.UpdateSubjectConditionSetRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.UpdateSubjectConditionSetResponse'
/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: DeleteSubjectConditionSet
operationId: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteSubjectConditionSetRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteSubjectConditionSetResponse'
/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets:
post:
tags:
- policy.subjectmapping.SubjectMappingService
summary: DeleteAllUnmappedSubjectConditionSets
operationId: policy.subjectmapping.SubjectMappingService.DeleteAllUnmappedSubjectConditionSets
parameters:
- name: Connect-Protocol-Version
in: header
required: true
schema:
$ref: '#/components/schemas/connect-protocol-version'
- name: Connect-Timeout-Ms
in: header
schema:
$ref: '#/components/schemas/connect-timeout-header'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsRequest'
required: true
responses:
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/connect.error'
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsResponse'
components:
schemas:
policy.PublicKey:
type: object
oneOf:
- properties:
cached:
title: cached
description: public key with additional information. Current preferred version
$ref: '#/components/schemas/policy.KasPublicKeySet'
title: cached
required:
- cached
- properties:
remote:
type: string
title: remote
description: 'kas public key url - optional since can also be retrieved via public key
URI must be a valid URL (e.g., ''https://demo.com/'') followed by additional segments. Each segment must start and end with an alphanumeric character, can contain hyphens, alphanumeric characters, and slashes.:
```
this.matches(''^https://[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?)*(/.*)?$'')
```
'
title: remote
required:
- remote
title: PublicKey
additionalProperties: false
description: Deprecated
policy.Algorithm:
type: string
title: Algorithm
enum:
- ALGORITHM_UNSPECIFIED
- ALGORITHM_RSA_2048
- ALGORITHM_RSA_4096
- ALGORITHM_EC_P256
- ALGORITHM_EC_P384
- ALGORITHM_EC_P521
- ALGORITHM_HPQT_XWING
- ALGORITHM_HPQT_SECP256R1_MLKEM768
- ALGORITHM_HPQT_SECP384R1_MLKEM1024
- ALGORITHM_MLKEM_768
- ALGORITHM_MLKEM_1024
description: Supported key algorithms.
policy.subjectmapping.UpdateSubjectMappingResponse:
type: object
properties:
subjectMapping:
title: subject_mapping
description: Only ID of the updated Subject Mapping provided
$ref: '#/components/schemas/policy.SubjectMapping'
title: UpdateSubjectMappingResponse
additionalProperties: false
policy.SourceType:
type: string
title: SourceType
enum:
- SOURCE_TYPE_UNSPECIFIED
- SOURCE_TYPE_INTERNAL
- SOURCE_TYPE_EXTERNAL
description: "Describes whether this kas is managed by the organization or if they imported\n the kas information from an external party. These two modes are necessary in order\n to encrypt a tdf dek with an external parties kas public key."
policy.subjectmapping.ListSubjectConditionSetsResponse:
type: object
properties:
subjectConditionSets:
type: array
items:
$ref: '#/components/schemas/policy.SubjectConditionSet'
title: subject_condition_sets
pagination:
title: pagination
$ref: '#/components/schemas/policy.PageResponse'
title: ListSubjectConditionSetsResponse
additionalProperties: false
policy.subjectmapping.CreateSubjectConditionSetRequest:
type: object
properties:
subjectConditionSet:
title: subject_condition_set
$ref: '#/components/schemas/policy.subjectmapping.SubjectConditionSetCreate'
namespaceId:
type: string
title: namespace_id
format: uuid
namespaceFqn:
type: string
title: namespace_fqn
minLength: 1
format: uri
title: CreateSubjectConditionSetRequest
required:
- subjectConditionSet
additionalProperties: false
policy.SubjectMapping:
type: object
properties:
id:
type: string
title: id
attributeValue:
title: attribute_value
description: 'the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"'
$ref: '#/components/schemas/policy.Value'
subjectConditionSet:
title: subject_condition_set
description: the reusable SubjectConditionSet mapped to the given Attribute Value
$ref: '#/components/schemas/policy.SubjectConditionSet'
actions:
type: array
items:
$ref: '#/components/schemas/policy.Action'
title: actions
description: The actions permitted by subjects in this mapping
namespace:
title: namespace
description: "the namespace containing this subject mapping\n possible this is empty. If so that means\n the Subject Mapping has not been migrated to a namespace."
$ref: '#/components/schemas/policy.Namespace'
metadata:
title: metadata
$ref: '#/components/schemas/common.Metadata'
title: SubjectMapping
additionalProperties: false
description: 'Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute
value + action(s) combination'
policy.ObligationTrigger:
type: object
properties:
id:
type: string
title: id
obligationValue:
title: obligation_value
$ref: '#/components/schemas/policy.ObligationValue'
action:
title: action
$ref: '#/components/schemas/policy.Action'
attributeValue:
title: attribute_value
$ref: '#/components/schemas/policy.Value'
context:
type: array
items:
$ref: '#/components/schemas/policy.RequestContext'
title: context
namespace:
title: namespace
description: The source namespace for this trigger, derived from the attribute value and action.
$ref: '#/components/schemas/policy.Namespace'
metadata:
title: metadata
$ref: '#/components/schemas/common.Metadata'
title: ObligationTrigger
additionalProperties: false
policy.subjectmapping.DeleteSubjectMappingResponse:
type: object
properties:
subjectMapping:
title: subject_mapping
description: Only ID of the updated Subject Mapping provided
$ref: '#/components/schemas/policy.SubjectMapping'
title: DeleteSubjectMappingResponse
additionalProperties: false
common.Metadata:
type: object
properties:
createdAt:
title: created_at
description: created_at set by server (entity who created will recorded in an audit event)
$ref: '#/components/schemas/google.protobuf.Timestamp'
updatedAt:
title: updated_at
description: updated_at set by server (entity who updated will recorded in an audit event)
$ref: '#/components/schemas/google.protobuf.Timestamp'
labels:
type: object
title: labels
additionalProperties:
type: string
title: value
description: optional short description
title: Metadata
additionalProperties: false
description: Struct to uniquely identify a resource with optional additional metadata
policy.subjectmapping.CreateSubjectMappingResponse:
type: object
properties:
subjectMapping:
title: subject_mapping
$ref: '#/components/schemas/policy.SubjectMapping'
title: CreateSubjectMappingResponse
additionalProperties: false
policy.subjectmapping.MatchSubjectMappingsResponse:
type: object
properties:
subjectMappings:
type: array
items:
$ref: '#/components/schemas/policy.SubjectMapping'
title: subject_mappings
title: MatchSubjectMappingsResponse
additionalProperties: false
connect-protocol-version:
type: number
title: Connect-Protocol-Version
enum:
- 1
description: Define the version of the Connect protocol
const: 1
policy.subjectmapping.UpdateSubjectConditionSetRequest:
type: object
properties:
id:
type: string
title: id
format: uuid
description: Required
subjectSets:
type: array
items:
$ref: '#/components/schemas/policy.SubjectSet'
title: subject_sets
description: "Optional\n If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions"
metadata:
title: metadata
description: Common metadata
$ref: '#/components/schemas/common.MetadataMutable'
metadataUpdateBehavior:
title: metadata_update_behavior
$ref: '#/components/schemas/common.MetadataUpdateEnum'
title: UpdateSubjectConditionSetRequest
additionalProperties: false
policy.ResourceMappingGroup:
type: object
properties:
id:
type: string
title: id
namespaceId:
type: string
title: namespace_id
description: the namespace containing the group of resource mappings
name:
type: string
title: name
description: "the common name for the group of resource mappings, which must be unique\n per namespace"
fqn:
type: string
title: fqn
description: the fully qualified name of the resource mapping group
metadata:
title: metadata
description: Common metadata
$ref: '#/components/schemas/common.Metadata'
title: ResourceMappingGroup
required:
- namespaceId
- name
additionalProperties: false
description: 'Resource Mapping Groups are namespaced collections of Resource Mappings
associated under a common group name.'
google.protobuf.Any:
type: object
properties:
type:
type: string
value:
type: string
format: binary
debug:
type: object
additionalProperties: true
additionalProperties: true
description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
policy.PolicyEnforcementPoint:
type: object
properties:
clientId:
type: string
title: client_id
minLength: 1
title: PolicyEnforcementPoint
additionalProperties: false
policy.KasPublicKey:
type: object
properties:
pem:
type: string
title: pem
maxLength: 8192
minLength: 1
description: x509 ASN.1 content in PEM envelope, usually
kid:
type: string
title: kid
maxLength: 32
minLength: 1
description: A unique string identifier for this key
alg:
not:
enum:
- 0
title: alg
description: "A known algorithm type with any additional parameters encoded.\n To start, these may be `rsa:2048` for RSA-based wrapping and\n `ec:secp256r1` for EC-based wrapping, but more formats may be added as needed."
$ref: '#/components/schemas/policy.KasPublicKeyAlgEnum'
title: KasPublicKey
additionalProperties: false
description: "Deprecated\n A KAS public key and some associated metadata for further identifcation"
policy.subjectmapping.SubjectConditionSetsSort:
type: object
properties:
field:
title: field
$ref: '#/components/schemas/policy.subjectmapping.SortSubjectConditionSetsType'
direction:
title: direction
$ref: '#/components/schemas/policy.SortDirection'
title: SubjectConditionSetsSort
additionalProperties: false
policy.subjectmapping.ListSubjectMappingsResponse:
type: object
properties:
subjectMappings:
type: array
items:
$ref: '#/components/schemas/policy.SubjectMapping'
title: subject_mappings
pagination:
title: pagination
$ref: '#/components/schemas/policy.PageResponse'
title: ListSubjectMappingsResponse
additionalProperties: false
policy.subjectmapping.UpdateSubjectMappingRequest:
type: object
properties:
id:
type: string
title: id
format: uuid
description: Required
subjectConditionSetId:
type: string
title: subject_condition_set_id
description: "Optional\n Replaces the existing SubjectConditionSet id with a new one\nOptional field must be a valid UUID:\n```\nsize(this) == 0 || this.matches('[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}')\n```\n\n"
actions:
type: array
items:
$ref: '#/components/schemas/policy.Action'
title: actions
description: "Optional\n Replaces entire list of actions permitted by subjects\nAction name or ID must not be empty if provided:\n```\nthis.size() == 0 || this.all(item, item.name != '' || item.id != '')\n```\n\n"
metadata:
title: metadata
description: Common metadata
$ref: '#/components/schemas/common.MetadataMutable'
metadataUpdateBehavior:
title: metadata_update_behavior
$ref: '#/components/schemas/common.MetadataUpdateEnum'
title: UpdateSubjectMappingRequest
additionalProperties: false
policy.KeyAccessServer:
type: object
properties:
id:
type: string
title: id
uri:
type: string
title: uri
description: 'Address of a KAS instance
URI must be a valid URL (e.g., ''https://demo.com/'') followed by additional segments. Each segment must start and end with an alphanumeric character, can contain hyphens, alphanumeric characters, and slashes.:
```
this.matches(''^https?://[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?)*(:[0-9]+)?(/.*)?$'')
```
'
publicKey:
title: public_key
description: 'Deprecated: KAS can have multiple key pairs'
$ref: '#/components/schemas/policy.PublicKey'
sourceType:
title: source_type
description: 'The source of the KAS: (INTERNAL, EXTERNAL)'
$ref: '#/components/schemas/policy.SourceType'
kasKeys:
type: array
items:
$ref: '#/components/schemas/policy.SimpleKasKey'
title: kas_keys
description: Kas keys associated with this KAS
name:
type: string
title: name
description: "Optional\n Unique name of the KAS instance"
metadata:
title: metadata
description: Common metadata
$ref: '#/components/schemas/common.Metadata'
title: KeyAccessServer
additionalProperties: false
description: Key Access Server Registry
policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsResponse:
type: object
properties:
subjectConditionSets:
type: array
items:
$ref: '#/components/schemas/policy.SubjectConditionSet'
title: subject_condition_sets
description: Only IDs of any deleted Subject Condition Set provided
title: DeleteAllUnmappedSubjectConditionSetsResponse
additionalProperties: false
policy.subjectmapping.SortSubjectMappingsType:
type: string
title: SortSubjectMappingsType
enum:
- SORT_SUBJECT_MAPPINGS_TYPE_UNSPECIFIED
- SORT_SUBJECT_MAPPINGS_TYPE_CREATED_AT
- SORT_SUBJECT_MAPPINGS_TYPE_UPDATED_AT
policy.subjectmapping.DeleteAllUnmappedSubjectConditionSetsRequest:
type: object
title: DeleteAllUnmappedSubjectConditionSetsRequest
additionalProperties: false
description: Prune any Subject Condition Sets not utilized within a Subject Mapping
google.protobuf.Timestamp:
type: string
examples:
- 1s
- 1.000340012s
format: date-time
description: "A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp =
# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/virtru/refs/heads/main/openapi/virtru-policy-subjectmapping-subjectmappingservice-api-openapi.yml