# @aurora-catalyst-generated
# @source cliter/iam/tenant-account.aurora.yaml

type IamTenantAccount {
  """
  Reference to the tenant in this account-tenant association
  """
  tenantId: ID!
  tenant: IamTenant
  """
  Reference to the account in this account-tenant association
  """
  accountId: ID!
  account: IamAccount
}

input IamCreateTenantAccountInput {
  tenantId: ID!
  accountId: ID!
}

input IamUpdateTenantAccountByIdInput {
  tenantId: ID!
  accountId: ID!
}

input IamUpdateTenantsAccountsInput {
  tenantId: ID
  accountId: ID
}
type Query {
  iamFindTenantAccount(query: QueryStatement, constraint: QueryStatement): IamTenantAccount

  iamFindTenantAccountById(
    tenantId: ID
    accountId: ID
    constraint: QueryStatement
  ): IamTenantAccount

  iamGetTenantsAccounts(query: QueryStatement, constraint: QueryStatement): [IamTenantAccount]!

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

type Mutation {
  iamCreateTenantAccount(payload: IamCreateTenantAccountInput!): IamTenantAccount

  iamCreateTenantsAccounts(payload: [IamCreateTenantAccountInput]!): Boolean!

  iamUpdateTenantAccountById(
    payload: IamUpdateTenantAccountByIdInput!
    constraint: QueryStatement
  ): IamTenantAccount

  iamUpdateTenantsAccounts(
    payload: IamUpdateTenantsAccountsInput!
    query: QueryStatement
    constraint: QueryStatement
  ): [IamTenantAccount]!

  iamDeleteTenantAccountById(
    tenantId: ID!
    accountId: ID!
    constraint: QueryStatement
  ): IamTenantAccount

  iamDeleteTenantsAccounts(query: QueryStatement, constraint: QueryStatement): [IamTenantAccount]!
}
