# Copyright (c) 2021 Felix Fontein
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

# Note that this doc fragment is **PRIVATE** to the collection. It can have breaking changes at any time.
# Do not use this from other collections or standalone plugins/modules!

from __future__ import annotations


class ModuleDocFragment:

    # Standard files documentation fragment

    # NOTE: This document fragment needs to be augmented by ZONE_ID_TYPE in a provider document fragment.
    #       The ZONE_ID_TYPE fragment will provide `choices` for the options.type entry.
    DOCUMENTATION = r"""
description:
  - Records are matched by prefix / record name and value.
attributes:
  check_mode:
    support: full
  diff_mode:
    support: full
  idempotent:
    support: full
options:
  state:
    description:
      - Specifies the state of the resource record.
    required: true
    choices: ['present', 'absent']
    type: str
  zone_name:
    description:
      - The DNS zone to modify.
      - Exactly one of O(zone_name) and O(zone_id) must be specified.
    type: str
    aliases:
      - zone
  zone_id:
    description:
      - The ID of the DNS zone to modify.
      - Exactly one of O(zone_name) and O(zone_id) must be specified.
  record:
    description:
      - The full DNS record to create or delete.
      - Exactly one of O(record) and O(prefix) must be specified.
    type: str
  prefix:
    description:
      - The prefix of the DNS record.
      - This is the part of O(record) before O(zone_name). For example, if the record to be modified is C(www.example.com)
        for the zone C(example.com), the prefix is V(www). If the record in this example would be C(example.com), the prefix
        would be V('') (empty string).
      - Exactly one of O(record) and O(prefix) must be specified.
    type: str
  ttl:
    description:
      - The TTL to give the new record, in seconds.
      - This is not used for record deletion.
    type: int
  type:
    description:
      - The type of DNS record to create or delete.
    required: true
    type: str
  value:
    description:
      - The new value when creating a DNS record.
      - When deleting a record all values for the record must be specified or it will not be deleted.
    required: true
    type: str
"""
