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

Merged
merged 1 commit into from
Apr 23, 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
72 changes: 36 additions & 36 deletions zero_trust/accessapplication.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ type Application struct {
// authentication. This setting always overrides the organization setting for WARP
// authentication.
AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"`
AllowedIDPs interface{} `json:"allowed_idps,required"`
AllowedIdps interface{} `json:"allowed_idps,required"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -300,7 +300,7 @@ type applicationJSON struct {
ID apijson.Field
UpdatedAt apijson.Field
AllowAuthenticateViaWARP apijson.Field
AllowedIDPs apijson.Field
AllowedIdps apijson.Field
AppLauncherVisible apijson.Field
AutoRedirectToIdentity apijson.Field
CorsHeaders apijson.Field
Expand Down Expand Up @@ -409,7 +409,7 @@ type ApplicationSelfHostedApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -473,7 +473,7 @@ type applicationSelfHostedApplicationJSON 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 @@ -515,7 +515,7 @@ type ApplicationSaaSApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -544,7 +544,7 @@ type ApplicationSaaSApplication struct {
// [ApplicationSaaSApplication]
type applicationSaaSApplicationJSON struct {
ID apijson.Field
AllowedIDPs apijson.Field
AllowedIdps apijson.Field
AppLauncherVisible apijson.Field
Aud apijson.Field
AutoRedirectToIdentity apijson.Field
Expand Down Expand Up @@ -583,7 +583,7 @@ type ApplicationSaaSApplicationSaasApp 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 SaasAppNameIDFormat `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down Expand Up @@ -628,7 +628,7 @@ type applicationSaaSApplicationSaasAppJSON 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 @@ -763,7 +763,7 @@ type ApplicationSaaSApplicationSaasAppAccessOIDCSaasAppCustomClaims struct {
// The name of the claim.
Name string `json:"name"`
// A mapping from IdP ID to claim name.
NameByIDP map[string]string `json:"name_by_idp"`
NameByIdP map[string]string `json:"name_by_idp"`
// If the claim is required when building an OIDC token.
Required bool `json:"required"`
// The scope of the claim.
Expand All @@ -777,7 +777,7 @@ type ApplicationSaaSApplicationSaasAppAccessOIDCSaasAppCustomClaims struct {
// [ApplicationSaaSApplicationSaasAppAccessOIDCSaasAppCustomClaims]
type applicationSaaSApplicationSaasAppAccessOIDCSaasAppCustomClaimsJSON struct {
Name apijson.Field
NameByIDP apijson.Field
NameByIdP apijson.Field
Required apijson.Field
Scope apijson.Field
Source apijson.Field
Expand Down Expand Up @@ -898,7 +898,7 @@ type ApplicationBrowserSSHApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -962,7 +962,7 @@ type applicationBrowserSSHApplicationJSON 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 @@ -1014,7 +1014,7 @@ type ApplicationBrowserVncApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible bool `json:"app_launcher_visible"`
// Audience tag.
Expand Down Expand Up @@ -1078,7 +1078,7 @@ type applicationBrowserVncApplicationJSON 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 @@ -1122,7 +1122,7 @@ type ApplicationAppLauncherApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1147,7 +1147,7 @@ type ApplicationAppLauncherApplication struct {
type applicationAppLauncherApplicationJSON 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 @@ -1199,7 +1199,7 @@ type ApplicationDeviceEnrollmentPermissionsApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1224,7 +1224,7 @@ type ApplicationDeviceEnrollmentPermissionsApplication struct {
type applicationDeviceEnrollmentPermissionsApplicationJSON 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 @@ -1276,7 +1276,7 @@ type ApplicationBrowserIsolationPermissionsApplication 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 []AllowedIdpsh `json:"allowed_idps"`
AllowedIdps []AllowedIdpsh `json:"allowed_idps"`
// Audience tag.
Aud string `json:"aud"`
// When set to `true`, users skip the identity provider selection step during
Expand All @@ -1301,7 +1301,7 @@ type ApplicationBrowserIsolationPermissionsApplication struct {
type applicationBrowserIsolationPermissionsApplicationJSON 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 @@ -1402,7 +1402,7 @@ type ApplicationParam struct {
// authentication. This setting always overrides the organization setting for WARP
// authentication.
AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"`
AllowedIDPs param.Field[interface{}] `json:"allowed_idps,required"`
AllowedIdps param.Field[interface{}] `json:"allowed_idps,required"`
// Displays the application in the App Launcher.
AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -1487,7 +1487,7 @@ type ApplicationSelfHostedApplicationParam 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[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -1548,7 +1548,7 @@ func (r ApplicationSelfHostedApplicationParam) implementsZeroTrustApplicationUni
type ApplicationSaaSApplicationParam struct {
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIDPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -1586,7 +1586,7 @@ type ApplicationSaaSApplicationSaasAppParam 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[SaasAppNameIDFormat] `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down Expand Up @@ -1669,7 +1669,7 @@ type ApplicationSaaSApplicationSaasAppAccessOIDCSaasAppCustomClaimsParam struct
// The name of the claim.
Name param.Field[string] `json:"name"`
// A mapping from IdP ID to claim name.
NameByIDP param.Field[map[string]string] `json:"name_by_idp"`
NameByIdP param.Field[map[string]string] `json:"name_by_idp"`
// If the claim is required when building an OIDC token.
Required param.Field[bool] `json:"required"`
// The scope of the claim.
Expand Down Expand Up @@ -1703,7 +1703,7 @@ type ApplicationBrowserSSHApplicationParam 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[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -1774,7 +1774,7 @@ type ApplicationBrowserVncApplicationParam 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[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// Displays the application in the App Launcher.
AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"`
// When set to `true`, users skip the identity provider selection step during
Expand Down Expand Up @@ -1837,7 +1837,7 @@ type ApplicationAppLauncherApplicationParam struct {
Type param.Field[ApplicationAppLauncherApplicationType] `json:"type,required"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIDPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// When set to `true`, users skip the identity provider selection step during
// login. You must specify only one identity provider in allowed_idps.
AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"`
Expand All @@ -1858,7 +1858,7 @@ type ApplicationDeviceEnrollmentPermissionsApplicationParam struct {
Type param.Field[ApplicationDeviceEnrollmentPermissionsApplicationType] `json:"type,required"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIDPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// When set to `true`, users skip the identity provider selection step during
// login. You must specify only one identity provider in allowed_idps.
AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"`
Expand All @@ -1880,7 +1880,7 @@ type ApplicationBrowserIsolationPermissionsApplicationParam struct {
Type param.Field[ApplicationBrowserIsolationPermissionsApplicationType] `json:"type,required"`
// The identity providers your users can select when connecting to this
// application. Defaults to all IdPs configured in your account.
AllowedIDPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"`
// When set to `true`, users skip the identity provider selection step during
// login. You must specify only one identity provider in allowed_idps.
AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"`
Expand Down Expand Up @@ -2027,14 +2027,14 @@ type SaasAppSource struct {
// The name of the IdP attribute.
Name string `json:"name"`
// A mapping from IdP ID to attribute name.
NameByIDP map[string]string `json:"name_by_idp"`
NameByIdP map[string]string `json:"name_by_idp"`
JSON saasAppSourceJSON `json:"-"`
}

// saasAppSourceJSON contains the JSON metadata for the struct [SaasAppSource]
type saasAppSourceJSON struct {
Name apijson.Field
NameByIDP apijson.Field
NameByIdP apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand All @@ -2051,7 +2051,7 @@ type SaasAppSourceParam struct {
// The name of the IdP attribute.
Name param.Field[string] `json:"name"`
// A mapping from IdP ID to attribute name.
NameByIDP param.Field[map[string]string] `json:"name_by_idp"`
NameByIdP param.Field[map[string]string] `json:"name_by_idp"`
}

func (r SaasAppSourceParam) MarshalJSON() (data []byte, err error) {
Expand All @@ -2071,7 +2071,7 @@ type SAMLSaasApp 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 SaasAppNameIDFormat `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down Expand Up @@ -2102,7 +2102,7 @@ type samlSaasAppJSON 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 @@ -2186,7 +2186,7 @@ type SAMLSaasAppParam 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[SaasAppNameIDFormat] `json:"name_id_format"`
// A [JSONata](https://jsonata.org/) expression that transforms an application's
Expand Down
4 changes: 2 additions & 2 deletions zero_trust/accessapplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) {
_, err := client.ZeroTrust.Access.Applications.New(context.TODO(), zero_trust.AccessApplicationNewParams{
Application: zero_trust.ApplicationSelfHostedApplicationParam{
AllowAuthenticateViaWARP: cloudflare.F(true),
AllowedIDPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AllowedIdps: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F(true),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(zero_trust.CorsHeadersParam{
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) {
zero_trust.AccessApplicationUpdateParams{
Application: zero_trust.ApplicationSelfHostedApplicationParam{
AllowAuthenticateViaWARP: cloudflare.F(true),
AllowedIDPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AllowedIdps: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F(true),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(zero_trust.CorsHeadersParam{
Expand Down
Loading