{
  "schemaVersion": 1,
  "operation": {
    "operationId": "previewSemanticAttributeImpact",
    "method": "POST",
    "path": "/api/v1/semantic-attributes/{attribute}/impact-preview",
    "summary": "Preview semantic attribute assignment impact",
    "description": "",
    "tags": [
      "Access"
    ],
    "effect": "write",
    "confirmation": "conditional",
    "parameters": [
      {
        "name": "attribute",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "type": "string"
        }
      }
    ],
    "requestBody": {
      "required": true,
      "description": "",
      "content": [
        {
          "contentType": "application/json",
          "schema": {
            "$ref": "#/components/schemas/SemanticAttributeImpactPreviewRequest"
          }
        }
      ]
    },
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/SemanticAttributeImpactPreviewResponse"
            }
          }
        ]
      },
      {
        "status": "400",
        "description": "The server could not understand the request due to invalid syntax.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "401",
        "description": "Access is unauthorized.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "403",
        "description": "Access is forbidden.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "404",
        "description": "The server cannot find the requested resource.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "409",
        "description": "The request conflicts with the current state of the server.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "412",
        "description": "Precondition failed.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "413",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "415",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "422",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "429",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "500",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "502",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "503",
        "description": "Service unavailable.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      }
    ]
  },
  "schemas": {
    "ProblemDetails": {
      "example": {
        "code": "example",
        "detail": "example",
        "errors": [
          {
            "code": "example",
            "detail": "example",
            "field": "example"
          }
        ],
        "instance": "example",
        "requestId": "example",
        "status": 1,
        "title": "example",
        "type": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "errors": {
          "example": [
            {
              "code": "example",
              "detail": "example",
              "field": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ProblemFieldError"
          },
          "type": "array"
        },
        "instance": {
          "example": "example",
          "type": "string"
        },
        "requestId": {
          "example": "example",
          "type": "string"
        },
        "status": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "requestId",
        "errors"
      ],
      "type": "object"
    },
    "ProblemFieldError": {
      "example": {
        "code": "example",
        "detail": "example",
        "field": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "field": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "field",
        "code",
        "detail"
      ],
      "type": "object"
    },
    "SemanticAttributeAssignmentTargetKindValue": {
      "enum": [
        "principal",
        "group"
      ],
      "example": "principal",
      "type": "string"
    },
    "SemanticAttributeImpactPreviewRequest": {
      "example": {
        "targetId": "example",
        "targetKind": "principal",
        "values": [
          {
            "booleanValue": true,
            "dateValue": "example",
            "decimalValue": "example",
            "integerValue": "example",
            "stringValue": "example",
            "timestampValue": "example",
            "type": "String"
          }
        ]
      },
      "properties": {
        "targetId": {
          "example": "example",
          "type": "string"
        },
        "targetKind": {
          "$ref": "#/components/schemas/SemanticAttributeAssignmentTargetKindValue"
        },
        "values": {
          "example": [
            {
              "booleanValue": true,
              "dateValue": "example",
              "decimalValue": "example",
              "integerValue": "example",
              "stringValue": "example",
              "timestampValue": "example",
              "type": "String"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/SemanticAttributeValue"
          },
          "type": "array"
        }
      },
      "required": [
        "targetKind",
        "targetId",
        "values"
      ],
      "type": "object"
    },
    "SemanticAttributeImpactPreviewResponse": {
      "example": {
        "affectedGroupCount": 1,
        "affectedPrincipalCount": 1,
        "attributeName": "example",
        "targetId": "example",
        "targetKind": "principal",
        "warnings": [
          "example"
        ]
      },
      "properties": {
        "affectedGroupCount": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "affectedPrincipalCount": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "attributeName": {
          "example": "example",
          "type": "string"
        },
        "targetId": {
          "example": "example",
          "type": "string"
        },
        "targetKind": {
          "$ref": "#/components/schemas/SemanticAttributeAssignmentTargetKindValue"
        },
        "warnings": {
          "example": [
            "example"
          ],
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "attributeName",
        "targetKind",
        "targetId",
        "affectedPrincipalCount",
        "affectedGroupCount",
        "warnings"
      ],
      "type": "object"
    },
    "SemanticAttributeValue": {
      "example": {
        "booleanValue": true,
        "dateValue": "example",
        "decimalValue": "example",
        "integerValue": "example",
        "stringValue": "example",
        "timestampValue": "example",
        "type": "String"
      },
      "properties": {
        "booleanValue": {
          "example": true,
          "type": "boolean"
        },
        "dateValue": {
          "example": "example",
          "type": "string"
        },
        "decimalValue": {
          "example": "example",
          "type": "string"
        },
        "integerValue": {
          "example": "example",
          "type": "string"
        },
        "stringValue": {
          "example": "example",
          "type": "string"
        },
        "timestampValue": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "$ref": "#/components/schemas/SemanticAttributeValueType"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "SemanticAttributeValueType": {
      "enum": [
        "String",
        "Boolean",
        "Integer",
        "Decimal",
        "Date",
        "Timestamp"
      ],
      "example": "String",
      "type": "string"
    }
  }
}
