Skip to content

Commit

Permalink
Made ID fields read-only by removing Optional attr
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecon committed Jul 18, 2024
1 parent 309125a commit b898951
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
14 changes: 10 additions & 4 deletions docs/resources/quality_forms_evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,14 @@ Optional:

- `default_answers_to_highest` (Boolean) Specifies whether to default answers to highest score. Defaults to `false`.
- `default_answers_to_na` (Boolean) Specifies whether to default answers to not applicable. Defaults to `false`.
- `id` (String) ID of the question group. READ-ONLY. No value should be provided for this field as one will be generated by the API.
- `manual_weight` (Boolean) Specifies whether a manual weight is set. Defaults to `true`.
- `na_enabled` (Boolean) Specifies whether a not applicable answer is enabled. Defaults to `false`.
- `visibility_condition` (Block List, Max: 1) Defines conditions where question would be visible (see [below for nested schema](#nestedblock--question_groups--visibility_condition))

Read-Only:

- `id` (String) ID of the question group.

<a id="nestedblock--question_groups--questions"></a>
### Nested Schema for `question_groups.questions`

Expand All @@ -138,12 +141,15 @@ Optional:

- `comments_required` (Boolean) Specifies whether comments are required. Defaults to `false`.
- `help_text` (String) Help text for the question.
- `id` (String) ID of the question. READ-ONLY. No value should be provided for this field as one will be generated by the API.
- `is_critical` (Boolean) True if the question is a critical question Defaults to `false`.
- `is_kill` (Boolean) True if the question is a fatal question Defaults to `false`.
- `na_enabled` (Boolean) Specifies whether a not applicable answer is enabled. Defaults to `false`.
- `visibility_condition` (Block List, Max: 1) Defines conditions where question would be visible (see [below for nested schema](#nestedblock--question_groups--questions--visibility_condition))

Read-Only:

- `id` (String) ID of the question.

<a id="nestedblock--question_groups--questions--answer_options"></a>
### Nested Schema for `question_groups.questions.answer_options`

Expand All @@ -152,9 +158,9 @@ Required:
- `text` (String)
- `value` (Number)

Optional:
Read-Only:

- `id` (String) The ID for the answer option. READ-ONLY. No value should be provided for this field as one will be generated by the API.
- `id` (String) The ID for the answer option.


<a id="nestedblock--question_groups--questions--visibility_condition"></a>
Expand Down
11 changes: 3 additions & 8 deletions genesyscloud/resource_genesyscloud_quality_forms_evaluation.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ import (
"github.com/mypurecloud/platform-client-sdk-go/v133/platformclientv2"
)

const readOnlyWarningMessage = "READ-ONLY. No value should be provided for this field as one will be generated by the API."

var (
evaluationFormQuestionGroup = &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Description: fmt.Sprintf("ID of the question group. %s", readOnlyWarningMessage),
Description: "ID of the question group.",
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"name": {
Expand Down Expand Up @@ -89,9 +86,8 @@ var (
evaluationFormQuestion = &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Description: fmt.Sprintf("ID of the question. %s", readOnlyWarningMessage),
Description: "ID of the question.",
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"text": {
Expand Down Expand Up @@ -166,8 +162,7 @@ var (
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Description: fmt.Sprintf("The ID for the answer option. %s", readOnlyWarningMessage),
Optional: true,
Description: "The ID for the answer option.",
Computed: true,
},
"text": {
Expand Down

0 comments on commit b898951

Please sign in to comment.