Skip to content

Commit 8b42fb8

Browse files
committed
state attribute with JSON naming
1 parent a1ecd5f commit 8b42fb8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

internal/service/pushbasedlogexportapi/resource.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service/searchdeploymentapi/resource.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/codegen/gofilegen/resource/resource_file.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func GenerateGoCode(input *codespec.Resource) string {
2727
switch tmplInputs.ResourceName {
2828
case "push_based_log_export_api":
2929
tmplInputs.APIOperations.Create.Wait = &codetemplate.Wait{
30-
StateAttribute: "State",
30+
StateAttribute: "state",
3131
PendingStates: []string{"INITIATING", "BUCKET_VERIFIED"},
3232
TargetStates: []string{"ACTIVE"},
3333
TimeoutSeconds: 15 * 60,
@@ -36,7 +36,7 @@ func GenerateGoCode(input *codespec.Resource) string {
3636
}
3737
tmplInputs.APIOperations.Update.Wait = tmplInputs.APIOperations.Create.Wait
3838
tmplInputs.APIOperations.Delete.Wait = &codetemplate.Wait{
39-
StateAttribute: "State",
39+
StateAttribute: "state",
4040
PendingStates: []string{"ACTIVE", "INITIATING", "BUCKET_VERIFIED"},
4141
TargetStates: []string{"UNCONFIGURED", retrystrategy.RetryStrategyDeletedState}, // DELETED is a special state value when API returns 404 or empty object
4242
TimeoutSeconds: 15 * 60,
@@ -45,7 +45,7 @@ func GenerateGoCode(input *codespec.Resource) string {
4545
}
4646
case "search_deployment_api":
4747
tmplInputs.APIOperations.Create.Wait = &codetemplate.Wait{
48-
StateAttribute: "StateName",
48+
StateAttribute: "stateName",
4949
PendingStates: []string{"UPDATING", "PAUSED"},
5050
TargetStates: []string{"IDLE"},
5151
TimeoutSeconds: 3 * 60 * 60,
@@ -54,7 +54,7 @@ func GenerateGoCode(input *codespec.Resource) string {
5454
}
5555
tmplInputs.APIOperations.Update.Wait = tmplInputs.APIOperations.Create.Wait
5656
tmplInputs.APIOperations.Delete.Wait = &codetemplate.Wait{
57-
StateAttribute: "StateName",
57+
StateAttribute: "stateName",
5858
PendingStates: []string{"IDLE", "UPDATING", "PAUSED"},
5959
TargetStates: []string{retrystrategy.RetryStrategyDeletedState}, // DELETED is a special state value when API returns 404 or empty object
6060
TimeoutSeconds: 3 * 60 * 60,

0 commit comments

Comments
 (0)