Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.134.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jan 9, 2024
1 parent f4e27dd commit b10ad19
Show file tree
Hide file tree
Showing 26 changed files with 470 additions and 145 deletions.
17 changes: 13 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ management:
docChecksum: 8ecc10127cd4d51cceddbc01756b40f4
docVersion: 0.0.1
speakeasyVersion: internal
generationVersion: 2.228.1
releaseVersion: 0.10.0
configChecksum: ae6aa247f4cac41bb380d4ba72d51037
generationVersion: 2.230.1
releaseVersion: 0.10.1
configChecksum: a6920bc98759320d71d4dc35f7d80c54
repoURL: https://github.com/speakeasy-sdks/terraform-provider-vercel.git
repoSubDirectory: .
published: true
features:
terraform:
constsAndDefaults: 0.1.2
core: 3.8.0
core: 3.8.1
deprecations: 2.81.1
globalSecurity: 2.81.2
globalServerURLs: 2.82.1
Expand Down Expand Up @@ -84,6 +84,15 @@ generatedFiles:
- internal/validators/ExactlyOneChild.go
- internal/validators/JSONParseValidator.go
- internal/validators/RFC3339Validator.go
- internal/validators/boolvalidators/not_null.go
- internal/validators/float64validators/not_null.go
- internal/validators/int64validators/not_null.go
- internal/validators/listvalidators/not_null.go
- internal/validators/mapvalidators/not_null.go
- internal/validators/numbervalidators/not_null.go
- internal/validators/objectvalidators/not_null.go
- internal/validators/setvalidators/not_null.go
- internal/validators/stringvalidators/not_null.go
- main.go
- terraform-registry-manifest.json
- tools/tools.go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
vercel = {
source = "zchee/vercel"
version = "0.10.0"
version = "0.10.1"
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,12 @@ Based on:
- OpenAPI Doc 0.0.1
- Speakeasy CLI 1.133.1 (2.228.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [terraform v0.10.0] .
- [terraform v0.10.0] .

## 2024-01-09 00:25:49
### Changes
Based on:
- OpenAPI Doc 0.0.1
- Speakeasy CLI 1.134.0 (2.230.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [terraform v0.10.1] .
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
vercel = {
source = "zchee/vercel"
version = "0.10.0"
version = "0.10.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
vercel = {
source = "zchee/vercel"
version = "0.10.0"
version = "0.10.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ generation:
fixes:
nameResolutionDec2023: false
terraform:
version: 0.10.0
version: 0.10.1
author: zchee
imports:
option: openapi
Expand Down
5 changes: 0 additions & 5 deletions internal/planmodifiers/boolplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyBool(ctx context.Context, req planmodifier.BoolR
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/float64planmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyFloat64(ctx context.Context, req planmodifier.Fl
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/int64planmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyInt64(ctx context.Context, req planmodifier.Int6
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/listplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyList(ctx context.Context, req planmodifier.ListR
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/mapplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyMap(ctx context.Context, req planmodifier.MapReq
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/numberplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyNumber(ctx context.Context, req planmodifier.Num
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/objectplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyObject(ctx context.Context, req planmodifier.Obj
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/setplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifySet(ctx context.Context, req planmodifier.SetReq
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
5 changes: 0 additions & 5 deletions internal/planmodifiers/stringplanmodifier/suppress_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
)

const (
// Standard suppresses "(known after changes)" messages unless there's an explicit change in state [excluding null <=> unknown transitions]
Standard = iota
// ExplicitSuppress strategy suppresses "(known after changes)" messages unless we're in the initial creation
ExplicitSuppress = iota
)
Expand Down Expand Up @@ -53,9 +51,6 @@ func (m suppressDiff) PlanModifyString(ctx context.Context, req planmodifier.Str
if utils.IsAllStateUnknown(ctx, req.State) {
return
}
if m.strategy == Standard && utils.IsAnyKnownChange(ctx, req.Plan, req.State) {
return
}

resp.PlanValue = req.StateValue
}
88 changes: 0 additions & 88 deletions internal/planmodifiers/utils/state_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,91 +23,3 @@ func IsAllStateUnknown(ctx context.Context, state tfsdk.State) bool {

return !anyFound
}

func IsAnyKnownChange(ctx context.Context, plan tfsdk.Plan, state tfsdk.State) bool {
attrs := state.Schema.GetAttributes()
anyFound := false
for k, _ := range attrs {
stateValue := new(attr.Value)
planValue := new(attr.Value)
state.GetAttribute(ctx, path.Root(k), stateValue)
plan.GetAttribute(ctx, path.Root(k), planValue)
anyFound = !isKnownEqual(ctx, stateValue, planValue)
if anyFound {
break
}
}

return anyFound
}

type HasElements interface {
Elements() []attr.Value
IsUnknown() bool
IsNull() bool
}
type HasAttributes interface {
Attributes() map[string]attr.Value
IsUnknown() bool
IsNull() bool
}

func isKnownEqual(ctx context.Context, a *attr.Value, b *attr.Value) bool {
if (*a).IsUnknown() || (*b).IsUnknown() {
return true
}
aType := (*a).Type(ctx)
bType := (*b).Type(ctx)
if !aType.Equal(bType) {
return false
}
attributeTypes, ok := aType.(attr.TypeWithAttributeTypes)
if ok {
check := true
for k, _ := range attributeTypes.AttributeTypes() {
objValA, isObjA := (*a).(HasAttributes)
objValB, isObjB := (*b).(HasAttributes)
if isObjA && isObjB {
if objValA.IsUnknown() || objValB.IsUnknown() {
continue
}
attrA, foundA := objValA.Attributes()[k]
attrB, foundB := objValB.Attributes()[k]
if foundA != foundB {
return false
}
if foundA {
check = isKnownEqual(ctx, &attrA, &attrB)
}
}
if !check {
break
}
}
return check
}
_, ok = aType.(attr.TypeWithElementType)
if ok {
aVal, aValList := (*a).(HasElements)
bVal, bValList := (*b).(HasElements)
if aValList && bValList {
if ((aVal).IsUnknown() || (aVal).IsNull()) && ((bVal).IsUnknown() || (bVal).IsNull()) {
return true
}
if len(aVal.Elements()) != len(bVal.Elements()) {
return false
} else {
for i, _ := range aVal.Elements() {
if !isKnownEqual(ctx, &aVal.Elements()[i], &bVal.Elements()[i]) {
return false
}
}
}
return true
}
return false
}

isEqual := (*a).Equal(*b)
return isEqual
}
6 changes: 3 additions & 3 deletions internal/sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func New(opts ...SDKOption) *Vercel {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "0.0.1",
SDKVersion: "0.10.0",
GenVersion: "2.228.1",
UserAgent: "speakeasy-sdk/go 0.10.0 2.228.1 0.0.1 vercel",
SDKVersion: "0.10.1",
GenVersion: "2.230.1",
UserAgent: "speakeasy-sdk/go 0.10.1 2.230.1 0.0.1 vercel",
},
}
for _, opt := range opts {
Expand Down
Loading

0 comments on commit b10ad19

Please sign in to comment.