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 #1592

Merged
merged 1 commit into from
Mar 21, 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
40 changes: 20 additions & 20 deletions zero_trust/accessapplication.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ type AccessAppsSelfHostedApplication struct {
AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -299,7 +299,7 @@ type accessAppsSelfHostedApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowAuthenticateViaWARP apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
AppLauncherVisible apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
Expand Down Expand Up @@ -406,7 +406,7 @@ type AccessAppsSaaSApplication struct {
ID string `json:"id"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -435,7 +435,7 @@ type AccessAppsSaaSApplication struct {
// [AccessAppsSaaSApplication]
type accessAppsSaaSApplicationJSON struct {
ID apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
AppLauncherVisible apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
Expand Down Expand Up @@ -496,7 +496,7 @@ type AccessAppsSaaSApplicationSaasAppAccessSamlSaasApp struct {
// initiated logins.
DefaultRelayState string `json:"default_relay_state"`
// The unique identifier for your SaaS application.
IdpEntityID string `json:"idp_entity_id"`
IDPEntityID string `json:"idp_entity_id"`
// The format of the name identifier sent to the SaaS application.
NameIDFormat AccessAppsSaaSApplicationSaasAppAccessSamlSaasAppNameIDFormat `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand All @@ -522,7 +522,7 @@ type accessAppsSaaSApplicationSaasAppAccessSamlSaasAppJSON struct {
CreatedAt apijson.Field
CustomAttributes apijson.Field
DefaultRelayState apijson.Field
IdpEntityID apijson.Field
IDPEntityID apijson.Field
NameIDFormat apijson.Field
NameIDTransformJsonata apijson.Field
PublicKey apijson.Field
Expand Down Expand Up @@ -764,7 +764,7 @@ type AccessAppsBrowserSSHApplication struct {
AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -825,7 +825,7 @@ type accessAppsBrowserSSHApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowAuthenticateViaWARP apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
AppLauncherVisible apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
Expand Down Expand Up @@ -942,7 +942,7 @@ type AccessAppsBrowserVncApplication struct {
AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -1003,7 +1003,7 @@ type accessAppsBrowserVncApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowAuthenticateViaWARP apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
AppLauncherVisible apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
Expand Down Expand Up @@ -1112,7 +1112,7 @@ type AccessAppsAppLauncherApplication struct {
ID string `json:"id"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1137,7 +1137,7 @@ type AccessAppsAppLauncherApplication struct {
type accessAppsAppLauncherApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
CreatedAt apijson.Field
Expand Down Expand Up @@ -1189,7 +1189,7 @@ type AccessAppsDeviceEnrollmentPermissionsApplication struct {
ID string `json:"id"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1214,7 +1214,7 @@ type AccessAppsDeviceEnrollmentPermissionsApplication struct {
type accessAppsDeviceEnrollmentPermissionsApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
CreatedAt apijson.Field
Expand Down Expand Up @@ -1266,7 +1266,7 @@ type AccessAppsBrowserIsolationPermissionsApplication struct {
ID string `json:"id"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps []string `json:"allowed_idps"`
AllowedIDPs []string `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1291,7 +1291,7 @@ type AccessAppsBrowserIsolationPermissionsApplication struct {
type accessAppsBrowserIsolationPermissionsApplicationJSON struct {
Type apijson.Field
ID apijson.Field
AllowedIdps apijson.Field
AllowedIDPs apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
CreatedAt apijson.Field
Expand Down Expand Up @@ -1421,7 +1421,7 @@ type AccessApplicationNewParams struct {
AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps param.Field[[]string] `json:"allowed_idps"`
AllowedIDPs param.Field[[]string] `json:"allowed_idps"`
AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
// login. You must specify only one identity provider in allowed_idps.
Expand Down Expand Up @@ -1542,7 +1542,7 @@ type AccessApplicationNewParamsSaasAppAccessSamlSaasApp struct {
// initiated logins.
DefaultRelayState param.Field[string] `json:"default_relay_state"`
// The unique identifier for your SaaS application.
IdpEntityID param.Field[string] `json:"idp_entity_id"`
IDPEntityID param.Field[string] `json:"idp_entity_id"`
// The format of the name identifier sent to the SaaS application.
NameIDFormat param.Field[AccessApplicationNewParamsSaasAppAccessSamlSaasAppNameIDFormat] `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down Expand Up @@ -1839,7 +1839,7 @@ type AccessApplicationUpdateParams struct {
AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIdps param.Field[[]string] `json:"allowed_idps"`
AllowedIDPs param.Field[[]string] `json:"allowed_idps"`
AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
// login. You must specify only one identity provider in allowed_idps.
Expand Down Expand Up @@ -1967,7 +1967,7 @@ type AccessApplicationUpdateParamsSaasAppAccessSamlSaasApp struct {
// initiated logins.
DefaultRelayState param.Field[string] `json:"default_relay_state"`
// The unique identifier for your SaaS application.
IdpEntityID param.Field[string] `json:"idp_entity_id"`
IDPEntityID param.Field[string] `json:"idp_entity_id"`
// The format of the name identifier sent to the SaaS application.
NameIDFormat param.Field[AccessApplicationUpdateParamsSaasAppAccessSamlSaasAppNameIDFormat] `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down
8 changes: 4 additions & 4 deletions zero_trust/accessapplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("string"),
ZoneID: cloudflare.F("string"),
AllowAuthenticateViaWARP: cloudflare.F(true),
AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AllowedIDPs: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F[any](map[string]interface{}{}),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(zero_trust.AccessApplicationNewParamsCorsHeaders{
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) {
}),
}),
DefaultRelayState: cloudflare.F("https://example.com"),
IdpEntityID: cloudflare.F("https://example.cloudflareaccess.com"),
IDPEntityID: cloudflare.F("https://example.cloudflareaccess.com"),
NameIDFormat: cloudflare.F(zero_trust.AccessApplicationNewParamsSaasAppAccessSamlSaasAppNameIDFormatID),
NameIDTransformJsonata: cloudflare.F("$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"),
PublicKey: cloudflare.F("example unique name"),
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("string"),
ZoneID: cloudflare.F("string"),
AllowAuthenticateViaWARP: cloudflare.F(true),
AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AllowedIDPs: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F[any](map[string]interface{}{}),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(zero_trust.AccessApplicationUpdateParamsCorsHeaders{
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) {
}),
}),
DefaultRelayState: cloudflare.F("https://example.com"),
IdpEntityID: cloudflare.F("https://example.cloudflareaccess.com"),
IDPEntityID: cloudflare.F("https://example.cloudflareaccess.com"),
NameIDFormat: cloudflare.F(zero_trust.AccessApplicationUpdateParamsSaasAppAccessSamlSaasAppNameIDFormatID),
NameIDTransformJsonata: cloudflare.F("$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"),
PublicKey: cloudflare.F("example unique name"),
Expand Down
18 changes: 9 additions & 9 deletions zero_trust/accessuseractivesession.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type AccessUserActiveSessionGetResponse struct {
Email string `json:"email"`
Geo AccessUserActiveSessionGetResponseGeo `json:"geo"`
Iat float64 `json:"iat"`
Idp AccessUserActiveSessionGetResponseIdp `json:"idp"`
IDP AccessUserActiveSessionGetResponseIDP `json:"idp"`
IP string `json:"ip"`
IsGateway bool `json:"is_gateway"`
IsWARP bool `json:"is_warp"`
Expand All @@ -172,7 +172,7 @@ type accessUserActiveSessionGetResponseJSON struct {
Email apijson.Field
Geo apijson.Field
Iat apijson.Field
Idp apijson.Field
IDP apijson.Field
IP apijson.Field
IsGateway apijson.Field
IsWARP apijson.Field
Expand Down Expand Up @@ -296,26 +296,26 @@ func (r accessUserActiveSessionGetResponseGeoJSON) RawJSON() string {
return r.raw
}

type AccessUserActiveSessionGetResponseIdp struct {
type AccessUserActiveSessionGetResponseIDP struct {
ID string `json:"id"`
Type string `json:"type"`
JSON accessUserActiveSessionGetResponseIdpJSON `json:"-"`
JSON accessUserActiveSessionGetResponseIDPJSON `json:"-"`
}

// accessUserActiveSessionGetResponseIdpJSON contains the JSON metadata for the
// struct [AccessUserActiveSessionGetResponseIdp]
type accessUserActiveSessionGetResponseIdpJSON struct {
// accessUserActiveSessionGetResponseIDPJSON contains the JSON metadata for the
// struct [AccessUserActiveSessionGetResponseIDP]
type accessUserActiveSessionGetResponseIDPJSON struct {
ID apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

func (r accessUserActiveSessionGetResponseIdpJSON) RawJSON() string {
func (r accessUserActiveSessionGetResponseIDPJSON) RawJSON() string {
return r.raw
}

Expand Down
18 changes: 9 additions & 9 deletions zero_trust/accessuserlastseenidentity.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type AccessIdentity struct {
Email string `json:"email"`
Geo AccessIdentityGeo `json:"geo"`
Iat float64 `json:"iat"`
Idp AccessIdentityIdp `json:"idp"`
IDP AccessIdentityIDP `json:"idp"`
IP string `json:"ip"`
IsGateway bool `json:"is_gateway"`
IsWARP bool `json:"is_warp"`
Expand All @@ -76,7 +76,7 @@ type accessIdentityJSON struct {
Email apijson.Field
Geo apijson.Field
Iat apijson.Field
Idp apijson.Field
IDP apijson.Field
IP apijson.Field
IsGateway apijson.Field
IsWARP apijson.Field
Expand Down Expand Up @@ -199,26 +199,26 @@ func (r accessIdentityGeoJSON) RawJSON() string {
return r.raw
}

type AccessIdentityIdp struct {
type AccessIdentityIDP struct {
ID string `json:"id"`
Type string `json:"type"`
JSON accessIdentityIdpJSON `json:"-"`
JSON accessIdentityIDPJSON `json:"-"`
}

// accessIdentityIdpJSON contains the JSON metadata for the struct
// [AccessIdentityIdp]
type accessIdentityIdpJSON struct {
// accessIdentityIDPJSON contains the JSON metadata for the struct
// [AccessIdentityIDP]
type accessIdentityIDPJSON struct {
ID apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

func (r accessIdentityIdpJSON) RawJSON() string {
func (r accessIdentityIDPJSON) RawJSON() string {
return r.raw
}

Expand Down
12 changes: 6 additions & 6 deletions zero_trust/identityprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ type AccessIdentityProvidersAccessSamlConfig struct {
// the Access callback.
HeaderAttributes []AccessIdentityProvidersAccessSamlConfigHeaderAttribute `json:"header_attributes"`
// X509 certificate to verify the signature in the SAML authentication response
IdpPublicCERTs []string `json:"idp_public_certs"`
IDPPublicCERTs []string `json:"idp_public_certs"`
// IdP Entity ID or Issuer URL
IssuerURL string `json:"issuer_url"`
// Sign the SAML authentication request with Access credentials. To verify the
Expand All @@ -1981,7 +1981,7 @@ type accessIdentityProvidersAccessSamlConfigJSON struct {
Attributes apijson.Field
EmailAttributeName apijson.Field
HeaderAttributes apijson.Field
IdpPublicCERTs apijson.Field
IDPPublicCERTs apijson.Field
IssuerURL apijson.Field
SignRequest apijson.Field
SSOTargetURL apijson.Field
Expand Down Expand Up @@ -4174,7 +4174,7 @@ type IdentityProviderListResponseAccessSamlConfig struct {
// the Access callback.
HeaderAttributes []IdentityProviderListResponseAccessSamlConfigHeaderAttribute `json:"header_attributes"`
// X509 certificate to verify the signature in the SAML authentication response
IdpPublicCERTs []string `json:"idp_public_certs"`
IDPPublicCERTs []string `json:"idp_public_certs"`
// IdP Entity ID or Issuer URL
IssuerURL string `json:"issuer_url"`
// Sign the SAML authentication request with Access credentials. To verify the
Expand All @@ -4191,7 +4191,7 @@ type identityProviderListResponseAccessSamlConfigJSON struct {
Attributes apijson.Field
EmailAttributeName apijson.Field
HeaderAttributes apijson.Field
IdpPublicCERTs apijson.Field
IDPPublicCERTs apijson.Field
IssuerURL apijson.Field
SignRequest apijson.Field
SSOTargetURL apijson.Field
Expand Down Expand Up @@ -4523,7 +4523,7 @@ type IdentityProviderNewParamsConfig struct {
// the Access callback.
HeaderAttributes param.Field[[]IdentityProviderNewParamsConfigHeaderAttribute] `json:"header_attributes"`
// X509 certificate to verify the signature in the SAML authentication response
IdpPublicCERTs param.Field[[]string] `json:"idp_public_certs"`
IDPPublicCERTs param.Field[[]string] `json:"idp_public_certs"`
// IdP Entity ID or Issuer URL
IssuerURL param.Field[string] `json:"issuer_url"`
// Your okta account url
Expand Down Expand Up @@ -4789,7 +4789,7 @@ type IdentityProviderUpdateParamsConfig struct {
// the Access callback.
HeaderAttributes param.Field[[]IdentityProviderUpdateParamsConfigHeaderAttribute] `json:"header_attributes"`
// X509 certificate to verify the signature in the SAML authentication response
IdpPublicCERTs param.Field[[]string] `json:"idp_public_certs"`
IDPPublicCERTs param.Field[[]string] `json:"idp_public_certs"`
// IdP Entity ID or Issuer URL
IssuerURL param.Field[string] `json:"issuer_url"`
// Your okta account url
Expand Down
Loading