# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule MailSlurpAPI.Api.ToolsController do
@moduledoc """
API calls for all endpoints tagged `ToolsController`.
"""
alias MailSlurpAPI.Connection
import MailSlurpAPI.RequestBuilder
@doc """
Create a BIMI record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- generate_bimi_record_options (GenerateBimiRecordOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.GenerateBimiRecordResults{}} on success
{:error, info} on failure
"""
@spec generate_bimi_record(Tesla.Env.client, MailSlurpAPI.Model.GenerateBimiRecordOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.GenerateBimiRecordResults.t} | {:error, Tesla.Env.t}
def generate_bimi_record(connection, generate_bimi_record_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/generate-bimi-record")
|> add_param(:body, :body, generate_bimi_record_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.GenerateBimiRecordResults{}}
])
end
@doc """
Create a DMARC record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- generate_dmarc_record_options (GenerateDmarcRecordOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.GenerateDmarcRecordResults{}} on success
{:error, info} on failure
"""
@spec generate_dmarc_record(Tesla.Env.client, MailSlurpAPI.Model.GenerateDmarcRecordOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.GenerateDmarcRecordResults.t} | {:error, Tesla.Env.t}
def generate_dmarc_record(connection, generate_dmarc_record_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/generate-dmarc-record")
|> add_param(:body, :body, generate_dmarc_record_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.GenerateDmarcRecordResults{}}
])
end
@doc """
Create a TLS reporting record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- generate_mta_sts_record_options (GenerateMtaStsRecordOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.GenerateMtaStsRecordResults{}} on success
{:error, info} on failure
"""
@spec generate_mta_sts_record(Tesla.Env.client, MailSlurpAPI.Model.GenerateMtaStsRecordOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.GenerateMtaStsRecordResults.t} | {:error, Tesla.Env.t}
def generate_mta_sts_record(connection, generate_mta_sts_record_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/generate-mta-sts-record")
|> add_param(:body, :body, generate_mta_sts_record_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.GenerateMtaStsRecordResults{}}
])
end
@doc """
Create a TLS reporting record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- generate_tls_reporting_record_options (GenerateTlsReportingRecordOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.GenerateTlsReportingRecordResults{}} on success
{:error, info} on failure
"""
@spec generate_tls_reporting_record(Tesla.Env.client, MailSlurpAPI.Model.GenerateTlsReportingRecordOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.GenerateTlsReportingRecordResults.t} | {:error, Tesla.Env.t}
def generate_tls_reporting_record(connection, generate_tls_reporting_record_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/generate-tls-reporting-record")
|> add_param(:body, :body, generate_tls_reporting_record_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.GenerateTlsReportingRecordResults{}}
])
end
@doc """
Lookup a BIMI record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- lookup_bimi_domain_options (LookupBimiDomainOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.LookupBimiDomainResults{}} on success
{:error, info} on failure
"""
@spec lookup_bimi_domain(Tesla.Env.client, MailSlurpAPI.Model.LookupBimiDomainOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.LookupBimiDomainResults.t} | {:error, Tesla.Env.t}
def lookup_bimi_domain(connection, lookup_bimi_domain_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/lookup-bimi-domain")
|> add_param(:body, :body, lookup_bimi_domain_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.LookupBimiDomainResults{}}
])
end
@doc """
Lookup a DMARC record policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- lookup_dmarc_domain_options (LookupDmarcDomainOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.LookupDmarcDomainResults{}} on success
{:error, info} on failure
"""
@spec lookup_dmarc_domain(Tesla.Env.client, MailSlurpAPI.Model.LookupDmarcDomainOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.LookupDmarcDomainResults.t} | {:error, Tesla.Env.t}
def lookup_dmarc_domain(connection, lookup_dmarc_domain_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/lookup-dmarc-domain")
|> add_param(:body, :body, lookup_dmarc_domain_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.LookupDmarcDomainResults{}}
])
end
@doc """
Lookup a MTA-STS domain policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- lookup_mta_sts_domain_options (LookupMtaStsDomainOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.LookupMtaStsDomainResults{}} on success
{:error, info} on failure
"""
@spec lookup_mta_sts_domain(Tesla.Env.client, MailSlurpAPI.Model.LookupMtaStsDomainOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.LookupMtaStsDomainResults.t} | {:error, Tesla.Env.t}
def lookup_mta_sts_domain(connection, lookup_mta_sts_domain_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/lookup-mta-sts-domain")
|> add_param(:body, :body, lookup_mta_sts_domain_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.LookupMtaStsDomainResults{}}
])
end
@doc """
Lookup a TLS reporting domain policy
## Parameters
- connection (MailSlurpAPI.Connection): Connection to server
- lookup_tls_reporting_domain_options (LookupTlsReportingDomainOptions):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %MailSlurpAPI.Model.LookupTlsReportingDomainResults{}} on success
{:error, info} on failure
"""
@spec lookup_tls_reporting_domain(Tesla.Env.client, MailSlurpAPI.Model.LookupTlsReportingDomainOptions.t, keyword()) :: {:ok, MailSlurpAPI.Model.LookupTlsReportingDomainResults.t} | {:error, Tesla.Env.t}
def lookup_tls_reporting_domain(connection, lookup_tls_reporting_domain_options, _opts \\ []) do
%{}
|> method(:post)
|> url("/tools/lookup-tls-reporting-domain")
|> add_param(:body, :body, lookup_tls_reporting_domain_options)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %MailSlurpAPI.Model.LookupTlsReportingDomainResults{}}
])
end
end