# Include{groups}
portals: {}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}

# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
# Include{containerAdvanced}

  - variable: plexanisync
    group: App Configuration
    label: PlexAniSync Configuration
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: interval
          label: Interval
          description: The time in between syncs in seconds.
          schema:
            type: int
            default: 3600
            min: 600
        - variable: plex
          label: Plex Integration
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: plex_section
                label: Plex Section
                description: The libraries where your anime resides.
                schema:
                  type: list
                  required: true
                  default: []
                  items:
                    - variable: plex_section_library_entry
                      label: Plex Section Library Entry
                      description: Single library per entry.
                      schema:
                        type: string
                        default: ""
                        required: true
              - variable: plex_auth_method
                label: Authentication Method
                description: Select Direct if you plan to auth the admin user, select Myplex for all other home users.
                schema:
                  type: string
                  required: true
                  default: direct
                  enum:
                    - value: direct
                      description: Direct
                    - value: myplex
                      description: MyPlex
              - variable: plex_url
                label: Plex URL
                description: The address to your Plex Media Server.
                schema:
                  type: string
                  show_if: [["plex_auth_method", "=", "direct"]]
                  required: true
                  default: ""
              - variable: plex_token
                label: Plex Token
                schema:
                  type: string
                  show_if: [["plex_auth_method", "=", "direct"]]
                  required: true
                  private: true
                  default: ""
              - variable: myplex_server_name
                label: Plex Server Name
                description: The name of your Plex Media Server.
                schema:
                  type: string
                  show_if: [["plex_auth_method", "=", "myplex"]]
                  required: true
                  default: ""
              - variable: myplex_user
                label: My Plex User
                schema:
                  type: string
                  show_if: [["plex_auth_method", "=", "myplex"]]
                  required: true
                  default: ""
              - variable: myplex_token
                label: My Plex Token
                schema:
                  type: string
                  show_if: [["plex_auth_method", "=", "myplex"]]
                  required: true
                  private: true
                  default: ""
              - variable: home_user_sync
                label: Home User Sync
                schema:
                  type: boolean
                  default: false
                  show_subquestions_if: true
                  subquestions:
                    - variable: home_username
                      label: Home Username
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: home_server_url
                      label: Home Server URL
                      schema:
                        type: string
                        required: true
                        default: ""
        - variable: anilist
          label: Anilist Integration
          schema:
            additional_attrs: true
            type: dict
            attrs:
              - variable: ani_username
                label: Ani UserName
                description: Your AniList.co username.
                schema:
                  type: string
                  required: true
                  default: ""
              - variable: ani_token
                label: Ani Token
                description: Your AniList.co token.
                schema:
                  type: string
                  max_length: 2000
                  required: true
                  private: true
                  default: ""
              - variable: plex_ep_count_priority
                label: Plex Episode Count Priority
                description: Plex episode watched count will take priority over AniList.
                schema:
                  type: boolean
                  default: false
              - variable: skip_list_update
                label: Skip List Update
                description: Will NOT update your AniList which is useful if you want to do a test run.
                schema:
                  type: boolean
                  default: false
              - variable: log_failed_matches
                label: Log Failed Matches
                description: Enables logs to be written when matches fail.
                schema:
                  type: boolean
                  default: true
  - variable: custom-mappings
    group: App Configuration
    label: Custom Mappings
    schema:
      additional_attrs: true
      type: dict
      attrs:
        - variable: remote_urls
          label: Remote URLs
          schema:
            type: list
            default: []
            items:
              - variable: remote_url_entry
                label: Remote URL
                schema:
                  type: string
                  required: true
                  default: ""
        - variable: entries
          label: Entries
          schema:
            type: list
            default: []
            items:
              - variable: entry
                label: entry
                schema:
                  additional_attrs: true
                  type: dict
                  attrs:
                    - variable: title
                      label: Title
                      schema:
                        type: string
                        required: true
                        default: ""
                    - variable: seasons
                      label: Seasons
                      schema:
                        type: list
                        default: []
                        items:
                          - variable: season_entry
                            label: Season Entry
                            schema:
                              additional_attrs: true
                              type: dict
                              attrs:
                                - variable: season
                                  label: Season
                                  schema:
                                    type: int
                                    required: true
                                - variable: anilist_id
                                  label: ANI List ID
                                  schema:
                                    type: int
                                    required: true
                    - variable: synonyms
                      label: Synonyms
                      schema:
                        type: list
                        default: []
                        items:
                          - variable: synonym
                            label: Synonym
                            schema:
                              type: string
                              required: true
                              default: ""
# Include{containerConfig}
# Include{serviceExpertRoot}
            default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceList}

# Include{podSecurityContextRoot}
        - variable: runAsUser
          label: runAsUser
          description: The UserID of the user running the application
          schema:
            type: int
            default: 0
        - variable: runAsGroup
          label: runAsGroup
          description: The groupID this App of the user running the application
          schema:
            type: int
            default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
        - variable: fsGroup
          label: fsGroup
          description: The group that should own ALL storage.
          schema:
            type: int
            default: 568

# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
