# @aurora-catalyst-generated
# @source cliter/iam/permission-role.aurora.yaml

type IamPermissionRole {
  permissionId: ID!
  permission: IamPermission
  roleId: ID!
  role: IamRole
}

input IamCreatePermissionRoleInput {
  permissionId: ID!
  roleId: ID!
}

input IamUpdatePermissionRoleByIdInput {
  permissionId: ID!
  roleId: ID!
}

input IamUpdatePermissionsRolesInput {
  permissionId: ID
  roleId: ID
}
type Query {
  iamFindPermissionRole(query: QueryStatement, constraint: QueryStatement): IamPermissionRole

  iamFindPermissionRoleById(
    permissionId: ID
    roleId: ID
    constraint: QueryStatement
  ): IamPermissionRole

  iamGetPermissionsRoles(query: QueryStatement, constraint: QueryStatement): [IamPermissionRole]!

  iamPaginatePermissionsRoles(query: QueryStatement, constraint: QueryStatement): Pagination!
}

type Mutation {
  iamCreatePermissionRole(payload: IamCreatePermissionRoleInput!): IamPermissionRole

  iamCreatePermissionsRoles(payload: [IamCreatePermissionRoleInput]!): Boolean!

  iamUpdatePermissionRoleById(
    payload: IamUpdatePermissionRoleByIdInput!
    constraint: QueryStatement
  ): IamPermissionRole

  iamUpdatePermissionsRoles(
    payload: IamUpdatePermissionsRolesInput!
    query: QueryStatement
    constraint: QueryStatement
  ): [IamPermissionRole]!

  iamDeletePermissionRoleById(
    permissionId: ID!
    roleId: ID!
    constraint: QueryStatement
  ): IamPermissionRole

  iamDeletePermissionsRoles(query: QueryStatement, constraint: QueryStatement): [IamPermissionRole]!
}
