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

feat(api): update via SDK Studio #1772

Merged
merged 1 commit into from
Apr 11, 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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1251
configured_endpoints: 1256
50 changes: 48 additions & 2 deletions api.md

Large diffs are not rendered by default.

82 changes: 0 additions & 82 deletions keyless_certificates/keylesscertificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,88 +111,6 @@ func (r *KeylessCertificateService) Get(ctx context.Context, keylessCertificateI
return
}

type Hostname struct {
// Keyless certificate identifier tag.
ID string `json:"id,required"`
// When the Keyless SSL was created.
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
// Whether or not the Keyless SSL is on or off.
Enabled bool `json:"enabled,required"`
// The keyless SSL name.
Host string `json:"host,required" format:"hostname"`
// When the Keyless SSL was last modified.
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
// The keyless SSL name.
Name string `json:"name,required"`
// Available permissions for the Keyless SSL for the current user requesting the
// item.
Permissions []interface{} `json:"permissions,required"`
// The keyless SSL port used to communicate between Cloudflare and the client's
// Keyless SSL server.
Port float64 `json:"port,required"`
// Status of the Keyless SSL.
Status HostnameStatus `json:"status,required"`
// Configuration for using Keyless SSL through a Cloudflare Tunnel
Tunnel Tunnel `json:"tunnel"`
JSON hostnameJSON `json:"-"`
}

// hostnameJSON contains the JSON metadata for the struct [Hostname]
type hostnameJSON struct {
ID apijson.Field
CreatedOn apijson.Field
Enabled apijson.Field
Host apijson.Field
ModifiedOn apijson.Field
Name apijson.Field
Permissions apijson.Field
Port apijson.Field
Status apijson.Field
Tunnel apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *Hostname) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r hostnameJSON) RawJSON() string {
return r.raw
}

func (r Hostname) ImplementsRulesListItemGetResponseUnion() {}

// Status of the Keyless SSL.
type HostnameStatus string

const (
HostnameStatusActive HostnameStatus = "active"
HostnameStatusDeleted HostnameStatus = "deleted"
)

func (r HostnameStatus) IsKnown() bool {
switch r {
case HostnameStatusActive, HostnameStatusDeleted:
return true
}
return false
}

type HostnameParam struct {
// The keyless SSL name.
Host param.Field[string] `json:"host,required" format:"hostname"`
// The keyless SSL port used to communicate between Cloudflare and the client's
// Keyless SSL server.
Port param.Field[float64] `json:"port,required"`
// Configuration for using Keyless SSL through a Cloudflare Tunnel
Tunnel param.Field[TunnelParam] `json:"tunnel"`
}

func (r HostnameParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

type KeylessCertificate struct {
// Keyless certificate identifier tag.
ID string `json:"id,required"`
Expand Down
Loading