# Generated by `mix github.gen` from docs/github-api/api.github.com.json.
# Do not edit by hand; re-run the task instead.
defmodule Noizu.Github.Api.Oidc do
@moduledoc """
GitHub `oidc` API.
"""
import Noizu.Github
@doc """
Create an OIDC custom property inclusion for an enterprise
@see https://docs.github.com/rest/actions/oidc#create-an-oidc-custom-property-inclusion-for-an-enterprise
"""
def create_oidc_custom_property_inclusion_for_enterprise(enterprise, body, options \\ nil) do
url = github_base() <> "/enterprises/#{enterprise}/actions/oidc/customization/properties/repo"
body = body
api_call(:post, url, body, Noizu.Github.OidcCustomPropertyInclusion, options)
end
@doc """
Create an OIDC custom property inclusion for an organization
@see https://docs.github.com/rest/actions/oidc#create-an-oidc-custom-property-inclusion-for-an-organization
"""
def create_oidc_custom_property_inclusion_for_org(org, body, options \\ nil) do
url = github_base() <> "/orgs/#{org}/actions/oidc/customization/properties/repo"
body = body
api_call(:post, url, body, Noizu.Github.OidcCustomPropertyInclusion, options)
end
@doc """
Delete an OIDC custom property inclusion for an enterprise
@see https://docs.github.com/rest/actions/oidc#delete-an-oidc-custom-property-inclusion-for-an-enterprise
"""
def delete_oidc_custom_property_inclusion_for_enterprise(
enterprise,
custom_property_name,
options \\ nil
) do
url =
github_base() <>
"/enterprises/#{enterprise}/actions/oidc/customization/properties/repo/#{custom_property_name}"
body = %{}
api_call(:delete, url, body, Noizu.Github.Raw, options)
end
@doc """
Delete an OIDC custom property inclusion for an organization
@see https://docs.github.com/rest/actions/oidc#delete-an-oidc-custom-property-inclusion-for-an-organization
"""
def delete_oidc_custom_property_inclusion_for_org(org, custom_property_name, options \\ nil) do
url =
github_base() <>
"/orgs/#{org}/actions/oidc/customization/properties/repo/#{custom_property_name}"
body = %{}
api_call(:delete, url, body, Noizu.Github.Raw, options)
end
@doc """
Get the customization template for an OIDC subject claim for an organization
@see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization
"""
def get_oidc_custom_sub_template_for_org(org, options \\ nil) do
url = github_base() <> "/orgs/#{org}/actions/oidc/customization/sub"
body = %{}
api_call(:get, url, body, Noizu.Github.OidcCustomSub, options)
end
@doc """
List OIDC custom property inclusions for an enterprise
@see https://docs.github.com/rest/actions/oidc#list-oidc-custom-property-inclusions-for-an-enterprise
"""
def list_oidc_custom_property_inclusions_for_enterprise(enterprise, options \\ nil) do
url = github_base() <> "/enterprises/#{enterprise}/actions/oidc/customization/properties/repo"
body = %{}
api_call(:get, url, body, Noizu.Github.Collection.OidcCustomPropertyInclusion, options)
end
@doc """
List OIDC custom property inclusions for an organization
@see https://docs.github.com/rest/actions/oidc#list-oidc-custom-property-inclusions-for-an-organization
"""
def list_oidc_custom_property_inclusions_for_org(org, options \\ nil) do
url = github_base() <> "/orgs/#{org}/actions/oidc/customization/properties/repo"
body = %{}
api_call(:get, url, body, Noizu.Github.Collection.OidcCustomPropertyInclusion, options)
end
@doc """
Set the customization template for an OIDC subject claim for an organization
@see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization
"""
def update_oidc_custom_sub_template_for_org(org, body, options \\ nil) do
url = github_base() <> "/orgs/#{org}/actions/oidc/customization/sub"
body = body
api_call(:put, url, body, Noizu.Github.Raw, options)
end
end