Skip to content

Commit

Permalink
Rename ToolVersionArchitecture to ToolVersionArchitectureOptions for …
Browse files Browse the repository at this point in the history
…convention
  • Loading branch information
natalie-todd committed Jan 10, 2025
1 parent 2392f39 commit f42957d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions admin_terraform_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type AdminTerraformVersion struct {
CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
}

type ToolVersionArchitecture struct {
type ToolVersionArchitectureOptions struct {
URL string `json:"url"`
Sha string `json:"sha"`
OS string `json:"os"`
Expand All @@ -84,16 +84,16 @@ type AdminTerraformVersionsListOptions struct {
// AdminTerraformVersionCreateOptions for creating a terraform version.
// https://developer.hashicorp.com/terraform/enterprise/api-docs/admin/terraform-versions#request-body
type AdminTerraformVersionCreateOptions struct {
Type string `jsonapi:"primary,terraform-versions"`
Version *string `jsonapi:"attr,version"` // Required
URL *string `jsonapi:"attr,url"` // Required
Sha *string `jsonapi:"attr,sha"` // Required
Official *bool `jsonapi:"attr,official,omitempty"`
Deprecated *bool `jsonapi:"attr,deprecated,omitempty"`
DeprecatedReason *string `jsonapi:"attr,deprecated-reason,omitempty"`
Enabled *bool `jsonapi:"attr,enabled,omitempty"`
Beta *bool `jsonapi:"attr,beta,omitempty"`
Archs []*ToolVersionArchitecture `jsonapi:"attr,archs,omitempty"`
Type string `jsonapi:"primary,terraform-versions"`
Version *string `jsonapi:"attr,version"` // Required
URL *string `jsonapi:"attr,url"` // Required
Sha *string `jsonapi:"attr,sha"` // Required
Official *bool `jsonapi:"attr,official,omitempty"`
Deprecated *bool `jsonapi:"attr,deprecated,omitempty"`
DeprecatedReason *string `jsonapi:"attr,deprecated-reason,omitempty"`
Enabled *bool `jsonapi:"attr,enabled,omitempty"`
Beta *bool `jsonapi:"attr,beta,omitempty"`
Archs []*ToolVersionArchitectureOptions `jsonapi:"attr,archs,omitempty"`
}

// AdminTerraformVersionUpdateOptions for updating terraform version.
Expand Down
4 changes: 2 additions & 2 deletions admin_terraform_version_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestAdminTerraformVersions_CreateDelete(t *testing.T) {
Official: Bool(false),
Enabled: Bool(false),
Beta: Bool(false),
Archs: []*ToolVersionArchitecture{
Archs: []*ToolVersionArchitectureOptions{
{
URL: "https://www.hashicorp.com",
Sha: *String(genSha(t)),
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestAdminTerraformVersions_ReadUpdate(t *testing.T) {
DeprecatedReason: String("Test Reason"),
Enabled: Bool(false),
Beta: Bool(false),
Archs: []*ToolVersionArchitecture{{
Archs: []*ToolVersionArchitectureOptions{{
URL: "https://www.hashicorp.com",
Sha: *sha,
OS: linux,
Expand Down

0 comments on commit f42957d

Please sign in to comment.