# Schema: OAuthClientCredentialsReadModel
---
type: object
required:
  - id
  - _type
  - clientId
  - confidential
  - _links
properties:
  id:
    type: integer
    minimum: 1
  _type:
    type: string
    enum:
      - OAuthClientCredentials
  clientId:
    type: string
    description: OAuth 2 client id
  confidential:
    type: boolean
    description: true, if OAuth 2 credentials are confidential, false, if no secret is stored
  createdAt:
    type: string
    format: date-time
    description: The time the OAuth client credentials were created at
  updatedAt:
    type: string
    format: date-time
    description: The time the OAuth client credentials were last updated
  _links:
    type: object
    required:
      - self
      - integration
    properties:
      self:
        allOf:
          - $ref: './link.yml'
          - description: |-
              This OAuth Client Credentials object

              **Resource**: OAuthClientCredentials
      integration:
        allOf:
          - $ref: './link.yml'
          - description: |-
              The resource that integrates this OAuth client credentials. Currently, only `Storage` resources are
              able to contain OAuth client credentials.

              **Resource**: Storage

example:
  id: 1337
  _type: OAuthClientCredentials
  clientId: O5h6WObhMg1Z8IcLHRE3_LMh4jJYmmca2V6OTFSv8DA
  confidential: true
  createdAt: '2022-12-07T12:56:42.836Z'
  updatedAt: '2022-12-07T12:56:42.836Z'
  _link:
    self:
      href: '/api/v3/oauth_client_credentials/1337'
    integration:
      href: '/api/v3/storages/42'
      title: Death Star Cloud
