Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- April 19, 2024 #45

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ type Client struct {
AccessCodes *accesscodesclient.Client
ActionAttempts *actionattempts.Client
ClientSessions *clientsessions.Client
ConnectWebviews *connectwebviews.Client
ConnectedAccounts *connectedaccounts.Client
Devices *devicesclient.Client
Events *events.Client
ConnectWebviews *connectwebviews.Client
Locks *locks.Client
Networks *networks.Client
Phones *phonesclient.Client
Expand All @@ -61,10 +61,10 @@ func NewClient(opts ...option.RequestOption) *Client {
AccessCodes: accesscodesclient.NewClient(opts...),
ActionAttempts: actionattempts.NewClient(opts...),
ClientSessions: clientsessions.NewClient(opts...),
ConnectWebviews: connectwebviews.NewClient(opts...),
ConnectedAccounts: connectedaccounts.NewClient(opts...),
Devices: devicesclient.NewClient(opts...),
Events: events.NewClient(opts...),
ConnectWebviews: connectwebviews.NewClient(opts...),
Locks: locks.NewClient(opts...),
Networks: networks.NewClient(opts...),
Phones: phonesclient.NewClient(opts...),
Expand Down
2 changes: 1 addition & 1 deletion core/request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r *RequestOptions) cloneHeader() http.Header {
headers := r.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/seamapi/go")
headers.Set("X-Fern-SDK-Version", "v0.3.3")
headers.Set("X-Fern-SDK-Version", "v0.3.4")
return headers
}

Expand Down
88 changes: 60 additions & 28 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ type AcsEntrance struct {
AcsSystemId string `json:"acs_system_id" url:"acs_system_id"`
CreatedAt time.Time `json:"created_at" url:"created_at"`
LatchMetadata *AcsEntranceLatchMetadata `json:"latch_metadata,omitempty" url:"latch_metadata,omitempty"`
Errors []*AcsEntranceErrorsItem `json:"errors,omitempty" url:"errors,omitempty"`
VisionlineMetadata *AcsEntranceVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`

_rawJSON json.RawMessage
Expand Down Expand Up @@ -672,6 +673,36 @@ func (a *AcsEntrance) String() string {
return fmt.Sprintf("%#v", a)
}

type AcsEntranceErrorsItem struct {
ErrorCode string `json:"error_code" url:"error_code"`
Message string `json:"message" url:"message"`

_rawJSON json.RawMessage
}

func (a *AcsEntranceErrorsItem) UnmarshalJSON(data []byte) error {
type unmarshaler AcsEntranceErrorsItem
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AcsEntranceErrorsItem(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AcsEntranceErrorsItem) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AcsEntranceLatchMetadata struct {
AccessibilityType string `json:"accessibility_type" url:"accessibility_type"`
DoorName string `json:"door_name" url:"door_name"`
Expand Down Expand Up @@ -2507,45 +2538,24 @@ func (d *DevicePropertiesCodeConstraintsItem) Accept(visitor DevicePropertiesCod
}

type DevicePropertiesCodeConstraintsItemMaxLength struct {
MinLength *float64 `json:"min_length,omitempty" url:"min_length,omitempty"`
MaxLength *float64 `json:"max_length,omitempty" url:"max_length,omitempty"`
constraintType string
ConstraintType DevicePropertiesCodeConstraintsItemMaxLengthConstraintType `json:"constraint_type,omitempty" url:"constraint_type,omitempty"`
MinLength *float64 `json:"min_length,omitempty" url:"min_length,omitempty"`
MaxLength *float64 `json:"max_length,omitempty" url:"max_length,omitempty"`

_rawJSON json.RawMessage
}

func (d *DevicePropertiesCodeConstraintsItemMaxLength) ConstraintType() string {
return d.constraintType
}

func (d *DevicePropertiesCodeConstraintsItemMaxLength) UnmarshalJSON(data []byte) error {
type embed DevicePropertiesCodeConstraintsItemMaxLength
var unmarshaler = struct {
embed
}{
embed: embed(*d),
}
if err := json.Unmarshal(data, &unmarshaler); err != nil {
type unmarshaler DevicePropertiesCodeConstraintsItemMaxLength
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*d = DevicePropertiesCodeConstraintsItemMaxLength(unmarshaler.embed)
d.constraintType = "name_length"
*d = DevicePropertiesCodeConstraintsItemMaxLength(value)
d._rawJSON = json.RawMessage(data)
return nil
}

func (d *DevicePropertiesCodeConstraintsItemMaxLength) MarshalJSON() ([]byte, error) {
type embed DevicePropertiesCodeConstraintsItemMaxLength
var marshaler = struct {
embed
ConstraintType string `json:"constraint_type"`
}{
embed: embed(*d),
ConstraintType: "name_length",
}
return json.Marshal(marshaler)
}

func (d *DevicePropertiesCodeConstraintsItemMaxLength) String() string {
if len(d._rawJSON) > 0 {
if value, err := core.StringifyJSON(d._rawJSON); err == nil {
Expand All @@ -2558,6 +2568,28 @@ func (d *DevicePropertiesCodeConstraintsItemMaxLength) String() string {
return fmt.Sprintf("%#v", d)
}

type DevicePropertiesCodeConstraintsItemMaxLengthConstraintType string

const (
DevicePropertiesCodeConstraintsItemMaxLengthConstraintTypeNameLength DevicePropertiesCodeConstraintsItemMaxLengthConstraintType = "name_length"
DevicePropertiesCodeConstraintsItemMaxLengthConstraintTypeNameMustBeUnique DevicePropertiesCodeConstraintsItemMaxLengthConstraintType = "name_must_be_unique"
)

func NewDevicePropertiesCodeConstraintsItemMaxLengthConstraintTypeFromString(s string) (DevicePropertiesCodeConstraintsItemMaxLengthConstraintType, error) {
switch s {
case "name_length":
return DevicePropertiesCodeConstraintsItemMaxLengthConstraintTypeNameLength, nil
case "name_must_be_unique":
return DevicePropertiesCodeConstraintsItemMaxLengthConstraintTypeNameMustBeUnique, nil
}
var t DevicePropertiesCodeConstraintsItemMaxLengthConstraintType
return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (d DevicePropertiesCodeConstraintsItemMaxLengthConstraintType) Ptr() *DevicePropertiesCodeConstraintsItemMaxLengthConstraintType {
return &d
}

type DevicePropertiesCodeConstraintsItemZero struct {
ConstraintType DevicePropertiesCodeConstraintsItemZeroConstraintType `json:"constraint_type,omitempty" url:"constraint_type,omitempty"`

Expand Down
Loading