diff --git a/.stats.yml b/.stats.yml index f3d3d54b408..97c983cd71b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 122 +configured_endpoints: 129 diff --git a/README.md b/README.md index f1b2b28db1f..e0676f3886e 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,9 @@ import ( func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), // defaults to os.LookupEnv("CLOUDFLARE_API_KEY") - option.WithEmail("dev@cloudflare.com"), // defaults to os.LookupEnv("CLOUDFLARE_EMAIL") + option.WithAPIEmail("dev@cloudflare.com"), // defaults to os.LookupEnv("CLOUDFLARE_EMAIL") option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), // defaults to os.LookupEnv("CLOUDFLARE_API_TOKEN") + option.WithUserServiceKey("My User Service Key"), ) zoneNewResponse, err := client.Zones.New(context.TODO(), cloudflare.ZoneNewParams{ Account: cloudflare.F(cloudflare.ZoneNewParamsAccount{ diff --git a/access.go b/access.go new file mode 100644 index 00000000000..0fc56da8f77 --- /dev/null +++ b/access.go @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessService] method instead. +type AccessService struct { + Options []option.RequestOption + Apps *AccessAppService + Certificates *AccessCertificateService + Groups *AccessGroupService + IdentityProviders *AccessIdentityProviderService + Organizations *AccessOrganizationService + ServiceTokens *AccessServiceTokenService + Bookmarks *AccessBookmarkService + Keys *AccessKeyService + Logs *AccessLogService + Seats *AccessSeatService + Users *AccessUserService +} + +// NewAccessService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewAccessService(opts ...option.RequestOption) (r *AccessService) { + r = &AccessService{} + r.Options = opts + r.Apps = NewAccessAppService(opts...) + r.Certificates = NewAccessCertificateService(opts...) + r.Groups = NewAccessGroupService(opts...) + r.IdentityProviders = NewAccessIdentityProviderService(opts...) + r.Organizations = NewAccessOrganizationService(opts...) + r.ServiceTokens = NewAccessServiceTokenService(opts...) + r.Bookmarks = NewAccessBookmarkService(opts...) + r.Keys = NewAccessKeyService(opts...) + r.Logs = NewAccessLogService(opts...) + r.Seats = NewAccessSeatService(opts...) + r.Users = NewAccessUserService(opts...) + return +} diff --git a/accessapp.go b/accessapp.go new file mode 100644 index 00000000000..1dcaf5bbde0 --- /dev/null +++ b/accessapp.go @@ -0,0 +1,2303 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessAppService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessAppService] method instead. +type AccessAppService struct { + Options []option.RequestOption + Cas *AccessAppCaService + RevokeTokens *AccessAppRevokeTokenService + UserPolicyChecks *AccessAppUserPolicyCheckService + Policies *AccessAppPolicyService +} + +// NewAccessAppService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessAppService(opts ...option.RequestOption) (r *AccessAppService) { + r = &AccessAppService{} + r.Options = opts + r.Cas = NewAccessAppCaService(opts...) + r.RevokeTokens = NewAccessAppRevokeTokenService(opts...) + r.UserPolicyChecks = NewAccessAppUserPolicyCheckService(opts...) + r.Policies = NewAccessAppPolicyService(opts...) + return +} + +// Fetches information about an Access application. +func (r *AccessAppService) Get(ctx context.Context, accountOrZone string, accountOrZoneID string, appID AccessAppGetParamsAppID, opts ...option.RequestOption) (res *AccessAppGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%v", accountOrZone, accountOrZoneID, appID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates an Access application. +func (r *AccessAppService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, appID AccessAppUpdateParamsVariant0AppID, body AccessAppUpdateParams, opts ...option.RequestOption) (res *AccessAppUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%v", accountOrZone, accountOrZoneID, appID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Deletes an application from Access. +func (r *AccessAppService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, appID AccessAppDeleteParamsAppID, opts ...option.RequestOption) (res *AccessAppDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%v", accountOrZone, accountOrZoneID, appID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Adds a new application to Access. +func (r *AccessAppService) AccessApplicationsAddAnApplication(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessAppAccessApplicationsAddAnApplicationParams, opts ...option.RequestOption) (res *AccessAppAccessApplicationsAddAnApplicationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists all Access applications in an account or zone. +func (r *AccessAppService) AccessApplicationsListAccessApplications(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessAppAccessApplicationsListAccessApplicationsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessAppGetResponse struct { + Errors []AccessAppGetResponseError `json:"errors"` + Messages []AccessAppGetResponseMessage `json:"messages"` + Result AccessAppGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppGetResponseSuccess `json:"success"` + JSON accessAppGetResponseJSON `json:"-"` +} + +// accessAppGetResponseJSON contains the JSON metadata for the struct +// [AccessAppGetResponse] +type accessAppGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppGetResponseErrorJSON `json:"-"` +} + +// accessAppGetResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppGetResponseError] +type accessAppGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppGetResponseMessageJSON `json:"-"` +} + +// accessAppGetResponseMessageJSON contains the JSON metadata for the struct +// [AccessAppGetResponseMessage] +type accessAppGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [AccessAppGetResponseResultObject], +// [AccessAppGetResponseResultObject], [AccessAppGetResponseResultObject], +// [AccessAppGetResponseResultObject], [AccessAppGetResponseResultObject], +// [AccessAppGetResponseResultObject], [AccessAppGetResponseResultObject] or +// [AccessAppGetResponseResultObject]. +type AccessAppGetResponseResult interface { + implementsAccessAppGetResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppGetResponseResult)(nil)).Elem(), "") +} + +type AccessAppGetResponseResultObject struct { + // UUID + ID string `json:"id"` + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + // Audience tag. + Aud string `json:"aud"` + // When set to `true`, users skip the identity provider selection step during + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CorsHeaders AccessAppGetResponseResultObjectCorsHeaders `json:"cors_headers"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage string `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL string `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages []string `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain string `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie bool `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute bool `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the application. + Name string `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute bool `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains []string `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration string `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial bool `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags []string `json:"tags"` + // The application type. + Type string `json:"type"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppGetResponseResultObjectJSON `json:"-"` +} + +// accessAppGetResponseResultObjectJSON contains the JSON metadata for the struct +// [AccessAppGetResponseResultObject] +type accessAppGetResponseResultObjectJSON struct { + ID apijson.Field + AllowAuthenticateViaWarp apijson.Field + AllowedIdps apijson.Field + AppLauncherVisible apijson.Field + Aud apijson.Field + AutoRedirectToIdentity apijson.Field + CorsHeaders apijson.Field + CreatedAt apijson.Field + CustomDenyMessage apijson.Field + CustomDenyURL apijson.Field + CustomNonIdentityDenyURL apijson.Field + CustomPages apijson.Field + Domain apijson.Field + EnableBindingCookie apijson.Field + HTTPOnlyCookieAttribute apijson.Field + LogoURL apijson.Field + Name apijson.Field + PathCookieAttribute apijson.Field + SameSiteCookieAttribute apijson.Field + SelfHostedDomains apijson.Field + ServiceAuth401Redirect apijson.Field + SessionDuration apijson.Field + SkipInterstitial apijson.Field + Tags apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppGetResponseResultObject) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppGetResponseResultObject) implementsAccessAppGetResponseResult() {} + +type AccessAppGetResponseResultObjectCorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders bool `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods bool `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins bool `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials bool `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders []interface{} `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods []AccessAppGetResponseResultObjectCorsHeadersAllowedMethod `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins []interface{} `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge float64 `json:"max_age"` + JSON accessAppGetResponseResultObjectCorsHeadersJSON `json:"-"` +} + +// accessAppGetResponseResultObjectCorsHeadersJSON contains the JSON metadata for +// the struct [AccessAppGetResponseResultObjectCorsHeaders] +type accessAppGetResponseResultObjectCorsHeadersJSON struct { + AllowAllHeaders apijson.Field + AllowAllMethods apijson.Field + AllowAllOrigins apijson.Field + AllowCredentials apijson.Field + AllowedHeaders apijson.Field + AllowedMethods apijson.Field + AllowedOrigins apijson.Field + MaxAge apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppGetResponseResultObjectCorsHeaders) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppGetResponseResultObjectCorsHeadersAllowedMethod string + +const ( + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodGet AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "GET" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodPost AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "POST" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodHead AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "HEAD" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodPut AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "PUT" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodDelete AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "DELETE" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodConnect AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "CONNECT" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodOptions AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "OPTIONS" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodTrace AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "TRACE" + AccessAppGetResponseResultObjectCorsHeadersAllowedMethodPatch AccessAppGetResponseResultObjectCorsHeadersAllowedMethod = "PATCH" +) + +// Whether the API call was successful +type AccessAppGetResponseSuccess bool + +const ( + AccessAppGetResponseSuccessTrue AccessAppGetResponseSuccess = true +) + +type AccessAppUpdateResponse struct { + Errors []AccessAppUpdateResponseError `json:"errors"` + Messages []AccessAppUpdateResponseMessage `json:"messages"` + Result AccessAppUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppUpdateResponseSuccess `json:"success"` + JSON accessAppUpdateResponseJSON `json:"-"` +} + +// accessAppUpdateResponseJSON contains the JSON metadata for the struct +// [AccessAppUpdateResponse] +type accessAppUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppUpdateResponseErrorJSON `json:"-"` +} + +// accessAppUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppUpdateResponseError] +type accessAppUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppUpdateResponseMessageJSON `json:"-"` +} + +// accessAppUpdateResponseMessageJSON contains the JSON metadata for the struct +// [AccessAppUpdateResponseMessage] +type accessAppUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [AccessAppUpdateResponseResultObject], +// [AccessAppUpdateResponseResultObject], [AccessAppUpdateResponseResultObject], +// [AccessAppUpdateResponseResultObject], [AccessAppUpdateResponseResultObject], +// [AccessAppUpdateResponseResultObject], [AccessAppUpdateResponseResultObject] or +// [AccessAppUpdateResponseResultObject]. +type AccessAppUpdateResponseResult interface { + implementsAccessAppUpdateResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppUpdateResponseResult)(nil)).Elem(), "") +} + +type AccessAppUpdateResponseResultObject struct { + // UUID + ID string `json:"id"` + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + // Audience tag. + Aud string `json:"aud"` + // When set to `true`, users skip the identity provider selection step during + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CorsHeaders AccessAppUpdateResponseResultObjectCorsHeaders `json:"cors_headers"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage string `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL string `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages []string `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain string `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie bool `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute bool `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the application. + Name string `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute bool `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains []string `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration string `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial bool `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags []string `json:"tags"` + // The application type. + Type string `json:"type"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppUpdateResponseResultObjectJSON `json:"-"` +} + +// accessAppUpdateResponseResultObjectJSON contains the JSON metadata for the +// struct [AccessAppUpdateResponseResultObject] +type accessAppUpdateResponseResultObjectJSON struct { + ID apijson.Field + AllowAuthenticateViaWarp apijson.Field + AllowedIdps apijson.Field + AppLauncherVisible apijson.Field + Aud apijson.Field + AutoRedirectToIdentity apijson.Field + CorsHeaders apijson.Field + CreatedAt apijson.Field + CustomDenyMessage apijson.Field + CustomDenyURL apijson.Field + CustomNonIdentityDenyURL apijson.Field + CustomPages apijson.Field + Domain apijson.Field + EnableBindingCookie apijson.Field + HTTPOnlyCookieAttribute apijson.Field + LogoURL apijson.Field + Name apijson.Field + PathCookieAttribute apijson.Field + SameSiteCookieAttribute apijson.Field + SelfHostedDomains apijson.Field + ServiceAuth401Redirect apijson.Field + SessionDuration apijson.Field + SkipInterstitial apijson.Field + Tags apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUpdateResponseResultObject) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppUpdateResponseResultObject) implementsAccessAppUpdateResponseResult() {} + +type AccessAppUpdateResponseResultObjectCorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders bool `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods bool `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins bool `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials bool `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders []interface{} `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods []AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins []interface{} `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge float64 `json:"max_age"` + JSON accessAppUpdateResponseResultObjectCorsHeadersJSON `json:"-"` +} + +// accessAppUpdateResponseResultObjectCorsHeadersJSON contains the JSON metadata +// for the struct [AccessAppUpdateResponseResultObjectCorsHeaders] +type accessAppUpdateResponseResultObjectCorsHeadersJSON struct { + AllowAllHeaders apijson.Field + AllowAllMethods apijson.Field + AllowAllOrigins apijson.Field + AllowCredentials apijson.Field + AllowedHeaders apijson.Field + AllowedMethods apijson.Field + AllowedOrigins apijson.Field + MaxAge apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUpdateResponseResultObjectCorsHeaders) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod string + +const ( + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodGet AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "GET" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodPost AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "POST" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodHead AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "HEAD" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodPut AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "PUT" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodDelete AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "DELETE" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodConnect AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "CONNECT" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodOptions AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "OPTIONS" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodTrace AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "TRACE" + AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethodPatch AccessAppUpdateResponseResultObjectCorsHeadersAllowedMethod = "PATCH" +) + +// Whether the API call was successful +type AccessAppUpdateResponseSuccess bool + +const ( + AccessAppUpdateResponseSuccessTrue AccessAppUpdateResponseSuccess = true +) + +type AccessAppDeleteResponse struct { + Errors []AccessAppDeleteResponseError `json:"errors"` + Messages []AccessAppDeleteResponseMessage `json:"messages"` + Result AccessAppDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppDeleteResponseSuccess `json:"success"` + JSON accessAppDeleteResponseJSON `json:"-"` +} + +// accessAppDeleteResponseJSON contains the JSON metadata for the struct +// [AccessAppDeleteResponse] +type accessAppDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppDeleteResponseErrorJSON `json:"-"` +} + +// accessAppDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppDeleteResponseError] +type accessAppDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppDeleteResponseMessageJSON `json:"-"` +} + +// accessAppDeleteResponseMessageJSON contains the JSON metadata for the struct +// [AccessAppDeleteResponseMessage] +type accessAppDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessAppDeleteResponseResultJSON `json:"-"` +} + +// accessAppDeleteResponseResultJSON contains the JSON metadata for the struct +// [AccessAppDeleteResponseResult] +type accessAppDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppDeleteResponseSuccess bool + +const ( + AccessAppDeleteResponseSuccessTrue AccessAppDeleteResponseSuccess = true +) + +type AccessAppAccessApplicationsAddAnApplicationResponse struct { + Errors []AccessAppAccessApplicationsAddAnApplicationResponseError `json:"errors"` + Messages []AccessAppAccessApplicationsAddAnApplicationResponseMessage `json:"messages"` + Result AccessAppAccessApplicationsAddAnApplicationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppAccessApplicationsAddAnApplicationResponseSuccess `json:"success"` + JSON accessAppAccessApplicationsAddAnApplicationResponseJSON `json:"-"` +} + +// accessAppAccessApplicationsAddAnApplicationResponseJSON contains the JSON +// metadata for the struct [AccessAppAccessApplicationsAddAnApplicationResponse] +type accessAppAccessApplicationsAddAnApplicationResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsAddAnApplicationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsAddAnApplicationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppAccessApplicationsAddAnApplicationResponseErrorJSON `json:"-"` +} + +// accessAppAccessApplicationsAddAnApplicationResponseErrorJSON contains the JSON +// metadata for the struct +// [AccessAppAccessApplicationsAddAnApplicationResponseError] +type accessAppAccessApplicationsAddAnApplicationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsAddAnApplicationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsAddAnApplicationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppAccessApplicationsAddAnApplicationResponseMessageJSON `json:"-"` +} + +// accessAppAccessApplicationsAddAnApplicationResponseMessageJSON contains the JSON +// metadata for the struct +// [AccessAppAccessApplicationsAddAnApplicationResponseMessage] +type accessAppAccessApplicationsAddAnApplicationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsAddAnApplicationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject], +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject] or +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject]. +type AccessAppAccessApplicationsAddAnApplicationResponseResult interface { + implementsAccessAppAccessApplicationsAddAnApplicationResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppAccessApplicationsAddAnApplicationResponseResult)(nil)).Elem(), "") +} + +type AccessAppAccessApplicationsAddAnApplicationResponseResultObject struct { + // UUID + ID string `json:"id"` + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + // Audience tag. + Aud string `json:"aud"` + // When set to `true`, users skip the identity provider selection step during + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CorsHeaders AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeaders `json:"cors_headers"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage string `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL string `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages []string `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain string `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie bool `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute bool `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the application. + Name string `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute bool `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains []string `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration string `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial bool `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags []string `json:"tags"` + // The application type. + Type string `json:"type"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppAccessApplicationsAddAnApplicationResponseResultObjectJSON `json:"-"` +} + +// accessAppAccessApplicationsAddAnApplicationResponseResultObjectJSON contains the +// JSON metadata for the struct +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObject] +type accessAppAccessApplicationsAddAnApplicationResponseResultObjectJSON struct { + ID apijson.Field + AllowAuthenticateViaWarp apijson.Field + AllowedIdps apijson.Field + AppLauncherVisible apijson.Field + Aud apijson.Field + AutoRedirectToIdentity apijson.Field + CorsHeaders apijson.Field + CreatedAt apijson.Field + CustomDenyMessage apijson.Field + CustomDenyURL apijson.Field + CustomNonIdentityDenyURL apijson.Field + CustomPages apijson.Field + Domain apijson.Field + EnableBindingCookie apijson.Field + HTTPOnlyCookieAttribute apijson.Field + LogoURL apijson.Field + Name apijson.Field + PathCookieAttribute apijson.Field + SameSiteCookieAttribute apijson.Field + SelfHostedDomains apijson.Field + ServiceAuth401Redirect apijson.Field + SessionDuration apijson.Field + SkipInterstitial apijson.Field + Tags apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsAddAnApplicationResponseResultObject) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppAccessApplicationsAddAnApplicationResponseResultObject) implementsAccessAppAccessApplicationsAddAnApplicationResponseResult() { +} + +type AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders bool `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods bool `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins bool `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials bool `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders []interface{} `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods []AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins []interface{} `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge float64 `json:"max_age"` + JSON accessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersJSON `json:"-"` +} + +// accessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersJSON +// contains the JSON metadata for the struct +// [AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeaders] +type accessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersJSON struct { + AllowAllHeaders apijson.Field + AllowAllMethods apijson.Field + AllowAllOrigins apijson.Field + AllowCredentials apijson.Field + AllowedHeaders apijson.Field + AllowedMethods apijson.Field + AllowedOrigins apijson.Field + MaxAge apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeaders) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod string + +const ( + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodGet AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "GET" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodPost AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "POST" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodHead AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "HEAD" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodPut AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "PUT" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodDelete AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "DELETE" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodConnect AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "CONNECT" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodOptions AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "OPTIONS" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodTrace AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "TRACE" + AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethodPatch AccessAppAccessApplicationsAddAnApplicationResponseResultObjectCorsHeadersAllowedMethod = "PATCH" +) + +// Whether the API call was successful +type AccessAppAccessApplicationsAddAnApplicationResponseSuccess bool + +const ( + AccessAppAccessApplicationsAddAnApplicationResponseSuccessTrue AccessAppAccessApplicationsAddAnApplicationResponseSuccess = true +) + +type AccessAppAccessApplicationsListAccessApplicationsResponse struct { + Errors []AccessAppAccessApplicationsListAccessApplicationsResponseError `json:"errors"` + Messages []AccessAppAccessApplicationsListAccessApplicationsResponseMessage `json:"messages"` + Result []AccessAppAccessApplicationsListAccessApplicationsResponseResult `json:"result"` + ResultInfo AccessAppAccessApplicationsListAccessApplicationsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessAppAccessApplicationsListAccessApplicationsResponseSuccess `json:"success"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseJSON contains the JSON +// metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponse] +type accessAppAccessApplicationsListAccessApplicationsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsListAccessApplicationsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseErrorJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseErrorJSON contains the +// JSON metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponseError] +type accessAppAccessApplicationsListAccessApplicationsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsListAccessApplicationsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseMessageJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseMessageJSON contains +// the JSON metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponseMessage] +type accessAppAccessApplicationsListAccessApplicationsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject], +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject] or +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject]. +type AccessAppAccessApplicationsListAccessApplicationsResponseResult interface { + implementsAccessAppAccessApplicationsListAccessApplicationsResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppAccessApplicationsListAccessApplicationsResponseResult)(nil)).Elem(), "") +} + +type AccessAppAccessApplicationsListAccessApplicationsResponseResultObject struct { + // UUID + ID string `json:"id"` + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + // Audience tag. + Aud string `json:"aud"` + // When set to `true`, users skip the identity provider selection step during + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CorsHeaders AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeaders `json:"cors_headers"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage string `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL string `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages []string `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain string `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie bool `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute bool `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the application. + Name string `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute bool `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains []string `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration string `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial bool `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags []string `json:"tags"` + // The application type. + Type string `json:"type"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseResultObjectJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseResultObjectJSON +// contains the JSON metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObject] +type accessAppAccessApplicationsListAccessApplicationsResponseResultObjectJSON struct { + ID apijson.Field + AllowAuthenticateViaWarp apijson.Field + AllowedIdps apijson.Field + AppLauncherVisible apijson.Field + Aud apijson.Field + AutoRedirectToIdentity apijson.Field + CorsHeaders apijson.Field + CreatedAt apijson.Field + CustomDenyMessage apijson.Field + CustomDenyURL apijson.Field + CustomNonIdentityDenyURL apijson.Field + CustomPages apijson.Field + Domain apijson.Field + EnableBindingCookie apijson.Field + HTTPOnlyCookieAttribute apijson.Field + LogoURL apijson.Field + Name apijson.Field + PathCookieAttribute apijson.Field + SameSiteCookieAttribute apijson.Field + SelfHostedDomains apijson.Field + ServiceAuth401Redirect apijson.Field + SessionDuration apijson.Field + SkipInterstitial apijson.Field + Tags apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponseResultObject) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppAccessApplicationsListAccessApplicationsResponseResultObject) implementsAccessAppAccessApplicationsListAccessApplicationsResponseResult() { +} + +type AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders bool `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods bool `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins bool `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials bool `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders []interface{} `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods []AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins []interface{} `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge float64 `json:"max_age"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersJSON +// contains the JSON metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeaders] +type accessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersJSON struct { + AllowAllHeaders apijson.Field + AllowAllMethods apijson.Field + AllowAllOrigins apijson.Field + AllowCredentials apijson.Field + AllowedHeaders apijson.Field + AllowedMethods apijson.Field + AllowedOrigins apijson.Field + MaxAge apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeaders) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod string + +const ( + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodGet AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "GET" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodPost AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "POST" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodHead AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "HEAD" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodPut AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "PUT" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodDelete AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "DELETE" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodConnect AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "CONNECT" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodOptions AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "OPTIONS" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodTrace AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "TRACE" + AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethodPatch AccessAppAccessApplicationsListAccessApplicationsResponseResultObjectCorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppAccessApplicationsListAccessApplicationsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessAppAccessApplicationsListAccessApplicationsResponseResultInfoJSON `json:"-"` +} + +// accessAppAccessApplicationsListAccessApplicationsResponseResultInfoJSON contains +// the JSON metadata for the struct +// [AccessAppAccessApplicationsListAccessApplicationsResponseResultInfo] +type accessAppAccessApplicationsListAccessApplicationsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppAccessApplicationsListAccessApplicationsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppAccessApplicationsListAccessApplicationsResponseSuccess bool + +const ( + AccessAppAccessApplicationsListAccessApplicationsResponseSuccessTrue AccessAppAccessApplicationsListAccessApplicationsResponseSuccess = true +) + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppGetParamsAppID interface { + ImplementsAccessAppGetParamsAppID() +} + +// This interface is a union satisfied by one of the following: +// [AccessAppUpdateParamsVariant0], [AccessAppUpdateParamsVariant1], +// [AccessAppUpdateParamsVariant2], [AccessAppUpdateParamsVariant3], +// [AccessAppUpdateParamsVariant4], [AccessAppUpdateParamsVariant5], +// [AccessAppUpdateParamsVariant6], [AccessAppUpdateParamsVariant7]. +type AccessAppUpdateParams interface { + ImplementsAccessAppUpdateParams() +} + +type AccessAppUpdateParamsVariant0 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppUpdateParamsVariant0CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant0) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant0) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant0AppID interface { + ImplementsAccessAppUpdateParamsVariant0AppID() +} + +type AccessAppUpdateParamsVariant0CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppUpdateParamsVariant0CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod string + +const ( + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodGet AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "GET" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodPost AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "POST" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodHead AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "HEAD" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodPut AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "PUT" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodDelete AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "DELETE" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodConnect AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "CONNECT" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodOptions AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "OPTIONS" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodTrace AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "TRACE" + AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodPatch AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppUpdateParamsVariant1 struct { + // 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + SaasApp param.Field[AccessAppUpdateParamsVariant1SaasApp] `json:"saas_app"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant1) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant1) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant1AppID interface { + ImplementsAccessAppUpdateParamsVariant1AppID() +} + +type AccessAppUpdateParamsVariant1SaasApp struct { + // The service provider's endpoint that is responsible for receiving and parsing a + // SAML assertion. + ConsumerServiceURL param.Field[string] `json:"consumer_service_url"` + CustomAttributes param.Field[AccessAppUpdateParamsVariant1SaasAppCustomAttributes] `json:"custom_attributes"` + // The URL that the user will be redirected to after a successful login for IDP + // 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"` + // The format of the name identifier sent to the SaaS application. + NameIDFormat param.Field[AccessAppUpdateParamsVariant1SaasAppNameIDFormat] `json:"name_id_format"` + // The Access public certificate that will be used to verify your identity. + PublicKey param.Field[string] `json:"public_key"` + // A globally unique name for an identity or service provider. + SpEntityID param.Field[string] `json:"sp_entity_id"` + // The endpoint where your SaaS application will send login requests. + SSOEndpoint param.Field[string] `json:"sso_endpoint"` +} + +func (r AccessAppUpdateParamsVariant1SaasApp) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppUpdateParamsVariant1SaasAppCustomAttributes struct { + // The name of the attribute. + Name param.Field[string] `json:"name"` + // A globally unique name for an identity or service provider. + NameFormat param.Field[AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormat] `json:"name_format"` + Source param.Field[AccessAppUpdateParamsVariant1SaasAppCustomAttributesSource] `json:"source"` +} + +func (r AccessAppUpdateParamsVariant1SaasAppCustomAttributes) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A globally unique name for an identity or service provider. +type AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormat string + +const ( + AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatUnspecified AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" + AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatBasic AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" + AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatUri AccessAppUpdateParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri" +) + +type AccessAppUpdateParamsVariant1SaasAppCustomAttributesSource struct { + // The name of the IdP attribute. + Name param.Field[string] `json:"name"` +} + +func (r AccessAppUpdateParamsVariant1SaasAppCustomAttributesSource) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The format of the name identifier sent to the SaaS application. +type AccessAppUpdateParamsVariant1SaasAppNameIDFormat string + +const ( + AccessAppUpdateParamsVariant1SaasAppNameIDFormatID AccessAppUpdateParamsVariant1SaasAppNameIDFormat = "id" + AccessAppUpdateParamsVariant1SaasAppNameIDFormatEmail AccessAppUpdateParamsVariant1SaasAppNameIDFormat = "email" +) + +type AccessAppUpdateParamsVariant2 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppUpdateParamsVariant2CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant2) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant2) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant2AppID interface { + ImplementsAccessAppUpdateParamsVariant2AppID() +} + +type AccessAppUpdateParamsVariant2CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppUpdateParamsVariant2CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod string + +const ( + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodGet AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "GET" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodPost AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "POST" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodHead AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "HEAD" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodPut AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "PUT" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodDelete AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "DELETE" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodConnect AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "CONNECT" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodOptions AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "OPTIONS" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodTrace AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "TRACE" + AccessAppUpdateParamsVariant2CorsHeadersAllowedMethodPatch AccessAppUpdateParamsVariant2CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppUpdateParamsVariant3 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppUpdateParamsVariant3CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant3) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant3) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant3AppID interface { + ImplementsAccessAppUpdateParamsVariant3AppID() +} + +type AccessAppUpdateParamsVariant3CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppUpdateParamsVariant3CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod string + +const ( + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodGet AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "GET" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodPost AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "POST" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodHead AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "HEAD" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodPut AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "PUT" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodDelete AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "DELETE" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodConnect AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "CONNECT" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodOptions AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "OPTIONS" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodTrace AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "TRACE" + AccessAppUpdateParamsVariant3CorsHeadersAllowedMethodPatch AccessAppUpdateParamsVariant3CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppUpdateParamsVariant4 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant4) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant4) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant4AppID interface { + ImplementsAccessAppUpdateParamsVariant4AppID() +} + +type AccessAppUpdateParamsVariant5 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant5) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant5) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant5AppID interface { + ImplementsAccessAppUpdateParamsVariant5AppID() +} + +type AccessAppUpdateParamsVariant6 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant6) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant6) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant6AppID interface { + ImplementsAccessAppUpdateParamsVariant6AppID() +} + +type AccessAppUpdateParamsVariant7 struct { + AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"` + // The URL or domain of the bookmark. + Domain param.Field[interface{}] `json:"domain"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppUpdateParamsVariant7) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppUpdateParamsVariant7) ImplementsAccessAppUpdateParams() { + +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUpdateParamsVariant7AppID interface { + ImplementsAccessAppUpdateParamsVariant7AppID() +} + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppDeleteParamsAppID interface { + ImplementsAccessAppDeleteParamsAppID() +} + +// This interface is a union satisfied by one of the following: +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant0], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant1], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant2], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant3], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant4], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant5], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant6], +// [AccessAppAccessApplicationsAddAnApplicationParamsVariant7]. +type AccessAppAccessApplicationsAddAnApplicationParams interface { + ImplementsAccessAppAccessApplicationsAddAnApplicationParams() +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant0 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant0) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant0) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod string + +const ( + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodGet AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "GET" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodPost AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "POST" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodHead AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "HEAD" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodPut AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "PUT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodDelete AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "DELETE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodConnect AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "CONNECT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodOptions AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "OPTIONS" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodTrace AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "TRACE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodPatch AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1 struct { + // 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + SaasApp param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasApp] `json:"saas_app"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant1) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant1) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasApp struct { + // The service provider's endpoint that is responsible for receiving and parsing a + // SAML assertion. + ConsumerServiceURL param.Field[string] `json:"consumer_service_url"` + CustomAttributes param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributes] `json:"custom_attributes"` + // The URL that the user will be redirected to after a successful login for IDP + // 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"` + // The format of the name identifier sent to the SaaS application. + NameIDFormat param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormat] `json:"name_id_format"` + // The Access public certificate that will be used to verify your identity. + PublicKey param.Field[string] `json:"public_key"` + // A globally unique name for an identity or service provider. + SpEntityID param.Field[string] `json:"sp_entity_id"` + // The endpoint where your SaaS application will send login requests. + SSOEndpoint param.Field[string] `json:"sso_endpoint"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasApp) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributes struct { + // The name of the attribute. + Name param.Field[string] `json:"name"` + // A globally unique name for an identity or service provider. + NameFormat param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormat] `json:"name_format"` + Source param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesSource] `json:"source"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributes) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A globally unique name for an identity or service provider. +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormat string + +const ( + AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatUnspecified AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified" + AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatBasic AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic" + AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormatUrnOasisNamesTcSaml2_0AttrnameFormatUri AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri" +) + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesSource struct { + // The name of the IdP attribute. + Name param.Field[string] `json:"name"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppCustomAttributesSource) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The format of the name identifier sent to the SaaS application. +type AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormat string + +const ( + AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormatID AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormat = "id" + AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormatEmail AccessAppAccessApplicationsAddAnApplicationParamsVariant1SaasAppNameIDFormat = "email" +) + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant2 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant2) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant2) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod string + +const ( + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodGet AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "GET" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodPost AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "POST" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodHead AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "HEAD" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodPut AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "PUT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodDelete AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "DELETE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodConnect AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "CONNECT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodOptions AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "OPTIONS" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodTrace AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "TRACE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethodPatch AccessAppAccessApplicationsAddAnApplicationParamsVariant2CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant3 struct { + // When set to true, users can authenticate to this application using their WARP + // session. When set to false this application will always require direct IdP + // authentication. This setting always overrides the organization setting for WARP + // authentication. + 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"` + // 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 + // login. You must specify only one identity provider in allowed_idps. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CorsHeaders param.Field[AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeaders] `json:"cors_headers"` + // The custom error message shown to a user when they are denied access to the + // application. + CustomDenyMessage param.Field[string] `json:"custom_deny_message"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing identity-based rules. + CustomDenyURL param.Field[string] `json:"custom_deny_url"` + // The custom URL a user is redirected to when they are denied access to the + // application when failing non-identity rules. + CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` + // The custom pages that will be displayed when applicable for this application + CustomPages param.Field[[]string] `json:"custom_pages"` + // The primary hostname and path that Access will secure. If the app is visible in + // the App Launcher dashboard, this is the domain that will be displayed. + Domain param.Field[string] `json:"domain"` + // Enables the binding cookie, which increases security against compromised + // authorization tokens and CSRF attacks. + EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` + // Enables the HttpOnly cookie attribute, which increases security against XSS + // attacks. + HTTPOnlyCookieAttribute param.Field[bool] `json:"http_only_cookie_attribute"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // Enables cookie paths to scope an application's JWT to the application path. If + // disabled, the JWT will scope to the hostname by default + PathCookieAttribute param.Field[bool] `json:"path_cookie_attribute"` + // Sets the SameSite cookie setting, which provides increased security against CSRF + // attacks. + SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` + // List of domains that Access will secure. + SelfHostedDomains param.Field[[]string] `json:"self_hosted_domains"` + // Returns a 401 status code when the request is blocked by a Service Auth policy. + ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // Enables automatic authentication through cloudflared. + SkipInterstitial param.Field[bool] `json:"skip_interstitial"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant3) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant3) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeaders struct { + // Allows all HTTP request headers. + AllowAllHeaders param.Field[bool] `json:"allow_all_headers"` + // Allows all HTTP request methods. + AllowAllMethods param.Field[bool] `json:"allow_all_methods"` + // Allows all origins. + AllowAllOrigins param.Field[bool] `json:"allow_all_origins"` + // When set to `true`, includes credentials (cookies, authorization headers, or TLS + // client certificates) with requests. + AllowCredentials param.Field[bool] `json:"allow_credentials"` + // Allowed HTTP request headers. + AllowedHeaders param.Field[[]interface{}] `json:"allowed_headers"` + // Allowed HTTP request methods. + AllowedMethods param.Field[[]AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod] `json:"allowed_methods"` + // Allowed origins. + AllowedOrigins param.Field[[]interface{}] `json:"allowed_origins"` + // The maximum number of seconds the results of a preflight request can be cached. + MaxAge param.Field[float64] `json:"max_age"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeaders) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod string + +const ( + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodGet AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "GET" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodPost AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "POST" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodHead AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "HEAD" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodPut AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "PUT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodDelete AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "DELETE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodConnect AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "CONNECT" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodOptions AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "OPTIONS" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodTrace AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "TRACE" + AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethodPatch AccessAppAccessApplicationsAddAnApplicationParamsVariant3CorsHeadersAllowedMethod = "PATCH" +) + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant4 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant4) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant4) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant5 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant5) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant5) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant6 struct { + // 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"` + // 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"` + // The amount of time that tokens issued for this application will be valid. Must + // be in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, + // s, m, h. + SessionDuration param.Field[string] `json:"session_duration"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant6) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant6) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} + +type AccessAppAccessApplicationsAddAnApplicationParamsVariant7 struct { + AppLauncherVisible param.Field[interface{}] `json:"app_launcher_visible"` + // The URL or domain of the bookmark. + Domain param.Field[interface{}] `json:"domain"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL param.Field[string] `json:"logo_url"` + // The name of the application. + Name param.Field[string] `json:"name"` + // The tags you want assigned to an application. Tags are used to filter + // applications in the App Launcher dashboard. + Tags param.Field[[]string] `json:"tags"` + // The application type. + Type param.Field[string] `json:"type"` +} + +func (r AccessAppAccessApplicationsAddAnApplicationParamsVariant7) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessAppAccessApplicationsAddAnApplicationParamsVariant7) ImplementsAccessAppAccessApplicationsAddAnApplicationParams() { + +} diff --git a/accessapp_test.go b/accessapp_test.go new file mode 100644 index 00000000000..93103b65e3e --- /dev/null +++ b/accessapp_test.go @@ -0,0 +1,234 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessAppGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Get( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"), + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"), + cloudflare.AccessAppUpdateParamsVariant0{ + AllowAuthenticateViaWarp: cloudflare.F(true), + AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AppLauncherVisible: cloudflare.F(true), + AutoRedirectToIdentity: cloudflare.F(true), + CorsHeaders: cloudflare.F(cloudflare.AccessAppUpdateParamsVariant0CorsHeaders{ + AllowAllHeaders: cloudflare.F(true), + AllowAllMethods: cloudflare.F(true), + AllowAllOrigins: cloudflare.F(true), + AllowCredentials: cloudflare.F(true), + AllowedHeaders: cloudflare.F([]interface{}{map[string]interface{}{}, map[string]interface{}{}, map[string]interface{}{}}), + AllowedMethods: cloudflare.F([]cloudflare.AccessAppUpdateParamsVariant0CorsHeadersAllowedMethod{cloudflare.AccessAppUpdateParamsVariant0CorsHeadersAllowedMethodGet}), + AllowedOrigins: cloudflare.F([]interface{}{"https://example.com"}), + MaxAge: cloudflare.F(-1.000000), + }), + CustomDenyMessage: cloudflare.F("string"), + CustomDenyURL: cloudflare.F("string"), + CustomNonIdentityDenyURL: cloudflare.F("string"), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + Domain: cloudflare.F("test.example.com/admin"), + EnableBindingCookie: cloudflare.F(true), + HTTPOnlyCookieAttribute: cloudflare.F(true), + LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), + Name: cloudflare.F("Admin Site"), + PathCookieAttribute: cloudflare.F(true), + SameSiteCookieAttribute: cloudflare.F("strict"), + SelfHostedDomains: cloudflare.F([]string{"test.example.com/admin", "test.anotherexample.com/staff"}), + ServiceAuth401Redirect: cloudflare.F(true), + SessionDuration: cloudflare.F("24h"), + SkipInterstitial: cloudflare.F(true), + Tags: cloudflare.F([]string{"engineers", "engineers", "engineers"}), + Type: cloudflare.F("self_hosted"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"), + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppAccessApplicationsAddAnApplicationWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.AccessApplicationsAddAnApplication( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessAppAccessApplicationsAddAnApplicationParamsVariant0{ + AllowAuthenticateViaWarp: cloudflare.F(true), + AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AppLauncherVisible: cloudflare.F(true), + AutoRedirectToIdentity: cloudflare.F(true), + CorsHeaders: cloudflare.F(cloudflare.AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeaders{ + AllowAllHeaders: cloudflare.F(true), + AllowAllMethods: cloudflare.F(true), + AllowAllOrigins: cloudflare.F(true), + AllowCredentials: cloudflare.F(true), + AllowedHeaders: cloudflare.F([]interface{}{map[string]interface{}{}, map[string]interface{}{}, map[string]interface{}{}}), + AllowedMethods: cloudflare.F([]cloudflare.AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethod{cloudflare.AccessAppAccessApplicationsAddAnApplicationParamsVariant0CorsHeadersAllowedMethodGet}), + AllowedOrigins: cloudflare.F([]interface{}{"https://example.com"}), + MaxAge: cloudflare.F(-1.000000), + }), + CustomDenyMessage: cloudflare.F("string"), + CustomDenyURL: cloudflare.F("string"), + CustomNonIdentityDenyURL: cloudflare.F("string"), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + Domain: cloudflare.F("test.example.com/admin"), + EnableBindingCookie: cloudflare.F(true), + HTTPOnlyCookieAttribute: cloudflare.F(true), + LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), + Name: cloudflare.F("Admin Site"), + PathCookieAttribute: cloudflare.F(true), + SameSiteCookieAttribute: cloudflare.F("strict"), + SelfHostedDomains: cloudflare.F([]string{"test.example.com/admin", "test.anotherexample.com/staff"}), + ServiceAuth401Redirect: cloudflare.F(true), + SessionDuration: cloudflare.F("24h"), + SkipInterstitial: cloudflare.F(true), + Tags: cloudflare.F([]string{"engineers", "engineers", "engineers"}), + Type: cloudflare.F("self_hosted"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppAccessApplicationsListAccessApplications(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.AccessApplicationsListAccessApplications( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessappca.go b/accessappca.go new file mode 100644 index 00000000000..2e0527428c2 --- /dev/null +++ b/accessappca.go @@ -0,0 +1,422 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessAppCaService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessAppCaService] method +// instead. +type AccessAppCaService struct { + Options []option.RequestOption +} + +// NewAccessAppCaService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessAppCaService(opts ...option.RequestOption) (r *AccessAppCaService) { + r = &AccessAppCaService{} + r.Options = opts + return +} + +// Deletes a short-lived certificate CA. +func (r *AccessAppCaService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessAppCaDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Generates a new short-lived certificate CA and public key. +func (r *AccessAppCaService) AccessShortLivedCertificateCAsNewAShortLivedCertificateCa(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +// Fetches a short-lived certificate CA and its public key. +func (r *AccessAppCaService) AccessShortLivedCertificateCAsGetAShortLivedCertificateCa(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Lists short-lived certificate CAs and their public keys. +func (r *AccessAppCaService) AccessShortLivedCertificateCAsListShortLivedCertificateCAs(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/ca", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessAppCaDeleteResponse struct { + Errors []AccessAppCaDeleteResponseError `json:"errors"` + Messages []AccessAppCaDeleteResponseMessage `json:"messages"` + Result AccessAppCaDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppCaDeleteResponseSuccess `json:"success"` + JSON accessAppCaDeleteResponseJSON `json:"-"` +} + +// accessAppCaDeleteResponseJSON contains the JSON metadata for the struct +// [AccessAppCaDeleteResponse] +type accessAppCaDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaDeleteResponseErrorJSON `json:"-"` +} + +// accessAppCaDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppCaDeleteResponseError] +type accessAppCaDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaDeleteResponseMessageJSON `json:"-"` +} + +// accessAppCaDeleteResponseMessageJSON contains the JSON metadata for the struct +// [AccessAppCaDeleteResponseMessage] +type accessAppCaDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaDeleteResponseResult struct { + // The ID of the CA. + ID string `json:"id"` + JSON accessAppCaDeleteResponseResultJSON `json:"-"` +} + +// accessAppCaDeleteResponseResultJSON contains the JSON metadata for the struct +// [AccessAppCaDeleteResponseResult] +type accessAppCaDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppCaDeleteResponseSuccess bool + +const ( + AccessAppCaDeleteResponseSuccessTrue AccessAppCaDeleteResponseSuccess = true +) + +type AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse struct { + Errors []AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseError `json:"errors"` + Messages []AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseSuccess `json:"success"` + JSON accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse] +type accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseErrorJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseError] +type accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessageJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessage] +type accessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseSuccess bool + +const ( + AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseSuccessTrue AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponseSuccess = true +) + +type AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse struct { + Errors []AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseError `json:"errors"` + Messages []AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseSuccess `json:"success"` + JSON accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse] +type accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseErrorJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseError] +type accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessageJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessage] +type accessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseSuccess bool + +const ( + AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseSuccessTrue AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponseSuccess = true +) + +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse struct { + Errors []AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseError `json:"errors"` + Messages []AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessage `json:"messages"` + Result []AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResult `json:"result"` + ResultInfo AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseSuccess `json:"success"` + JSON accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse] +type accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseErrorJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseError] +type accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessageJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessage] +type accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResult struct { + // The ID of the CA. + ID string `json:"id"` + // The Application Audience (AUD) tag. Identifies the application associated with + // the CA. + Aud string `json:"aud"` + // The public key to add to your SSH server configuration. + PublicKey string `json:"public_key"` + JSON accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResult] +type accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultJSON struct { + ID apijson.Field + Aud apijson.Field + PublicKey apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfoJSON `json:"-"` +} + +// accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfo] +type accessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseSuccess bool + +const ( + AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseSuccessTrue AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponseSuccess = true +) diff --git a/accessappca_test.go b/accessappca_test.go new file mode 100644 index 00000000000..e43f75556b0 --- /dev/null +++ b/accessappca_test.go @@ -0,0 +1,137 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessAppCaDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Cas.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCa(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Cas.AccessShortLivedCertificateCAsNewAShortLivedCertificateCa( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCa(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Cas.AccessShortLivedCertificateCAsGetAShortLivedCertificateCa( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAs(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Cas.AccessShortLivedCertificateCAsListShortLivedCertificateCAs( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessapppolicy.go b/accessapppolicy.go new file mode 100644 index 00000000000..6e8ab865311 --- /dev/null +++ b/accessapppolicy.go @@ -0,0 +1,12763 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessAppPolicyService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessAppPolicyService] method +// instead. +type AccessAppPolicyService struct { + Options []option.RequestOption +} + +// NewAccessAppPolicyService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessAppPolicyService(opts ...option.RequestOption) (r *AccessAppPolicyService) { + r = &AccessAppPolicyService{} + r.Options = opts + return +} + +// Fetches a single Access policy. +func (r *AccessAppPolicyService) Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string, opts ...option.RequestOption) (res *AccessAppPolicyGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/policies/%s", accountOrZone, accountOrZoneID, uuid1, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Update a configured Access policy. +func (r *AccessAppPolicyService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string, body AccessAppPolicyUpdateParams, opts ...option.RequestOption) (res *AccessAppPolicyUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/policies/%s", accountOrZone, accountOrZoneID, uuid1, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Delete an Access policy. +func (r *AccessAppPolicyService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string, opts ...option.RequestOption) (res *AccessAppPolicyDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/policies/%s", accountOrZone, accountOrZoneID, uuid1, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Create a new Access policy for an application. +func (r *AccessAppPolicyService) AccessPoliciesNewAnAccessPolicy(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body AccessAppPolicyAccessPoliciesNewAnAccessPolicyParams, opts ...option.RequestOption) (res *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/policies", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists Access policies configured for an application. +func (r *AccessAppPolicyService) AccessPoliciesListAccessPolicies(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessAppPolicyAccessPoliciesListAccessPoliciesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%s/policies", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessAppPolicyGetResponse struct { + Errors []AccessAppPolicyGetResponseError `json:"errors"` + Messages []AccessAppPolicyGetResponseMessage `json:"messages"` + Result AccessAppPolicyGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppPolicyGetResponseSuccess `json:"success"` + JSON accessAppPolicyGetResponseJSON `json:"-"` +} + +// accessAppPolicyGetResponseJSON contains the JSON metadata for the struct +// [AccessAppPolicyGetResponse] +type accessAppPolicyGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyGetResponseErrorJSON `json:"-"` +} + +// accessAppPolicyGetResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseError] +type accessAppPolicyGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyGetResponseMessageJSON `json:"-"` +} + +// accessAppPolicyGetResponseMessageJSON contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseMessage] +type accessAppPolicyGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyGetResponseResult struct { + // UUID + ID string `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups []AccessAppPolicyGetResponseResultApprovalGroup `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired bool `json:"approval_required"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The action Access will take if a user matches this policy. + Decision AccessAppPolicyGetResponseResultDecision `json:"decision"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessAppPolicyGetResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessAppPolicyGetResponseResultInclude `json:"include"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired bool `json:"isolation_required"` + // The name of the Access policy. + Name string `json:"name"` + // The order of execution for this policy. Must be unique for each policy. + Precedence int64 `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt string `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired bool `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require []AccessAppPolicyGetResponseResultRequire `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration string `json:"session_duration"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppPolicyGetResponseResultJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultJSON contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResult] +type accessAppPolicyGetResponseResultJSON struct { + ID apijson.Field + ApprovalGroups apijson.Field + ApprovalRequired apijson.Field + CreatedAt apijson.Field + Decision apijson.Field + Exclude apijson.Field + Include apijson.Field + IsolationRequired apijson.Field + Name apijson.Field + Precedence apijson.Field + PurposeJustificationPrompt apijson.Field + PurposeJustificationRequired apijson.Field + Require apijson.Field + SessionDuration apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyGetResponseResultApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded float64 `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses []interface{} `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid string `json:"email_list_uuid"` + JSON accessAppPolicyGetResponseResultApprovalGroupJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultApprovalGroupJSON contains the JSON metadata for +// the struct [AccessAppPolicyGetResponseResultApprovalGroup] +type accessAppPolicyGetResponseResultApprovalGroupJSON struct { + ApprovalsNeeded apijson.Field + EmailAddresses apijson.Field + EmailListUuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultApprovalGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyGetResponseResultDecision string + +const ( + AccessAppPolicyGetResponseResultDecisionAllow AccessAppPolicyGetResponseResultDecision = "allow" + AccessAppPolicyGetResponseResultDecisionDeny AccessAppPolicyGetResponseResultDecision = "deny" + AccessAppPolicyGetResponseResultDecisionNonIdentity AccessAppPolicyGetResponseResultDecision = "non_identity" + AccessAppPolicyGetResponseResultDecisionBypass AccessAppPolicyGetResponseResultDecision = "bypass" +) + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyGetResponseResultExcludeAccessEmailRule], +// [AccessAppPolicyGetResponseResultExcludeAccessEmailListRule], +// [AccessAppPolicyGetResponseResultExcludeAccessDomainRule], +// [AccessAppPolicyGetResponseResultExcludeAccessEveryoneRule], +// [AccessAppPolicyGetResponseResultExcludeAccessIPRule], +// [AccessAppPolicyGetResponseResultExcludeAccessIPListRule], +// [AccessAppPolicyGetResponseResultExcludeAccessCertificateRule], +// [AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRule], +// [AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRule], +// [AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRule], +// [AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRule], +// [AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRule], +// [AccessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyGetResponseResultExcludeAccessCountryRule], +// [AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRule] or +// [AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRule]. +type AccessAppPolicyGetResponseResultExclude interface { + implementsAccessAppPolicyGetResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyGetResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyGetResponseResultExcludeAccessEmailRule struct { + Email AccessAppPolicyGetResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultExcludeAccessEmailRule] +type accessAppPolicyGetResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessEmailRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyGetResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessEmailRuleEmail] +type accessAppPolicyGetResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyGetResponseResultExcludeAccessEmailListRule struct { + EmailList AccessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessEmailListRule] +type accessAppPolicyGetResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessEmailListRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailList] +type accessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyGetResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessDomainRule] +type accessAppPolicyGetResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessDomainRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomain] +type accessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyGetResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessEveryoneRule] +type accessAppPolicyGetResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessEveryoneRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyGetResponseResultExcludeAccessIPRule struct { + IP AccessAppPolicyGetResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultExcludeAccessIPRule] +type accessAppPolicyGetResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessIPRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultExcludeAccessIPRuleIP] +type accessAppPolicyGetResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyGetResponseResultExcludeAccessIPListRule struct { + IPList AccessAppPolicyGetResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessIPListRule] +type accessAppPolicyGetResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessIPListRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessIPListRuleIPList] +type accessAppPolicyGetResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyGetResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessCertificateRule] +type accessAppPolicyGetResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessCertificateRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +// Matches an Access group. +type AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRule struct { + Group AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRule] +type accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroup] +type accessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRule] +type accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRule] +type accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRule] +type accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRule] +type accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOkta] +type accessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRule] +type accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSaml] +type accessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRule] +type accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRule] +type accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyGetResponseResultExcludeAccessCountryRule struct { + Geo AccessAppPolicyGetResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessCountryRule] +type accessAppPolicyGetResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessCountryRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessCountryRuleGeo] +type accessAppPolicyGetResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRule] +type accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRule] +type accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRule) implementsAccessAppPolicyGetResponseResultExclude() { +} + +type AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyGetResponseResultIncludeAccessEmailRule], +// [AccessAppPolicyGetResponseResultIncludeAccessEmailListRule], +// [AccessAppPolicyGetResponseResultIncludeAccessDomainRule], +// [AccessAppPolicyGetResponseResultIncludeAccessEveryoneRule], +// [AccessAppPolicyGetResponseResultIncludeAccessIPRule], +// [AccessAppPolicyGetResponseResultIncludeAccessIPListRule], +// [AccessAppPolicyGetResponseResultIncludeAccessCertificateRule], +// [AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRule], +// [AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRule], +// [AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRule], +// [AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRule], +// [AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRule], +// [AccessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyGetResponseResultIncludeAccessCountryRule], +// [AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRule] or +// [AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRule]. +type AccessAppPolicyGetResponseResultInclude interface { + implementsAccessAppPolicyGetResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyGetResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyGetResponseResultIncludeAccessEmailRule struct { + Email AccessAppPolicyGetResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultIncludeAccessEmailRule] +type accessAppPolicyGetResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessEmailRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyGetResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessEmailRuleEmail] +type accessAppPolicyGetResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyGetResponseResultIncludeAccessEmailListRule struct { + EmailList AccessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessEmailListRule] +type accessAppPolicyGetResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessEmailListRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailList] +type accessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyGetResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessDomainRule] +type accessAppPolicyGetResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessDomainRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomain] +type accessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyGetResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessEveryoneRule] +type accessAppPolicyGetResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessEveryoneRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyGetResponseResultIncludeAccessIPRule struct { + IP AccessAppPolicyGetResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultIncludeAccessIPRule] +type accessAppPolicyGetResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessIPRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultIncludeAccessIPRuleIP] +type accessAppPolicyGetResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyGetResponseResultIncludeAccessIPListRule struct { + IPList AccessAppPolicyGetResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessIPListRule] +type accessAppPolicyGetResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessIPListRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessIPListRuleIPList] +type accessAppPolicyGetResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyGetResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessCertificateRule] +type accessAppPolicyGetResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessCertificateRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +// Matches an Access group. +type AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRule struct { + Group AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRule] +type accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroup] +type accessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRule] +type accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRule] +type accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRule] +type accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRule] +type accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOkta] +type accessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRule] +type accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSaml] +type accessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRule] +type accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRule] +type accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyGetResponseResultIncludeAccessCountryRule struct { + Geo AccessAppPolicyGetResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessCountryRule] +type accessAppPolicyGetResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessCountryRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessCountryRuleGeo] +type accessAppPolicyGetResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRule] +type accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRule] +type accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRule) implementsAccessAppPolicyGetResponseResultInclude() { +} + +type AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyGetResponseResultRequireAccessEmailRule], +// [AccessAppPolicyGetResponseResultRequireAccessEmailListRule], +// [AccessAppPolicyGetResponseResultRequireAccessDomainRule], +// [AccessAppPolicyGetResponseResultRequireAccessEveryoneRule], +// [AccessAppPolicyGetResponseResultRequireAccessIPRule], +// [AccessAppPolicyGetResponseResultRequireAccessIPListRule], +// [AccessAppPolicyGetResponseResultRequireAccessCertificateRule], +// [AccessAppPolicyGetResponseResultRequireAccessAccessGroupRule], +// [AccessAppPolicyGetResponseResultRequireAccessAzureGroupRule], +// [AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRule], +// [AccessAppPolicyGetResponseResultRequireAccessOktaGroupRule], +// [AccessAppPolicyGetResponseResultRequireAccessSamlGroupRule], +// [AccessAppPolicyGetResponseResultRequireAccessServiceTokenRule], +// [AccessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRule], +// [AccessAppPolicyGetResponseResultRequireAccessCountryRule], +// [AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRule] or +// [AccessAppPolicyGetResponseResultRequireAccessDevicePostureRule]. +type AccessAppPolicyGetResponseResultRequire interface { + implementsAccessAppPolicyGetResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyGetResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyGetResponseResultRequireAccessEmailRule struct { + Email AccessAppPolicyGetResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyGetResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultRequireAccessEmailRule] +type accessAppPolicyGetResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessEmailRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyGetResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessEmailRuleEmail] +type accessAppPolicyGetResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyGetResponseResultRequireAccessEmailListRule struct { + EmailList AccessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyGetResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessEmailListRule] +type accessAppPolicyGetResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessEmailListRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailList] +type accessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyGetResponseResultRequireAccessDomainRule struct { + EmailDomain AccessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyGetResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessDomainRule] +type accessAppPolicyGetResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessDomainRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomain] +type accessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyGetResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyGetResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessEveryoneRule] +type accessAppPolicyGetResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessEveryoneRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyGetResponseResultRequireAccessIPRule struct { + IP AccessAppPolicyGetResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyGetResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultRequireAccessIPRule] +type accessAppPolicyGetResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessIPRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyGetResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessAppPolicyGetResponseResultRequireAccessIPRuleIP] +type accessAppPolicyGetResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyGetResponseResultRequireAccessIPListRule struct { + IPList AccessAppPolicyGetResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyGetResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessIPListRule] +type accessAppPolicyGetResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessIPListRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessIPListRuleIPList] +type accessAppPolicyGetResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyGetResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyGetResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessCertificateRule] +type accessAppPolicyGetResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessCertificateRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +// Matches an Access group. +type AccessAppPolicyGetResponseResultRequireAccessAccessGroupRule struct { + Group AccessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAccessGroupRule] +type accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessAccessGroupRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroup] +type accessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyGetResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAzureGroupRule] +type accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessAzureGroupRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRule] +type accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRule] +type accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyGetResponseResultRequireAccessOktaGroupRule struct { + Okta AccessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessOktaGroupRule] +type accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessOktaGroupRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOkta] +type accessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyGetResponseResultRequireAccessSamlGroupRule struct { + Saml AccessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessSamlGroupRule] +type accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessSamlGroupRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSaml] +type accessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyGetResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessServiceTokenRule] +type accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessServiceTokenRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRule] +type accessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRule] +type accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyGetResponseResultRequireAccessCountryRule struct { + Geo AccessAppPolicyGetResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyGetResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessCountryRule] +type accessAppPolicyGetResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessCountryRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyGetResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessCountryRuleGeo] +type accessAppPolicyGetResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRule] +type accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyGetResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessDevicePostureRule] +type accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyGetResponseResultRequireAccessDevicePostureRule) implementsAccessAppPolicyGetResponseResultRequire() { +} + +type AccessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyGetResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppPolicyGetResponseSuccess bool + +const ( + AccessAppPolicyGetResponseSuccessTrue AccessAppPolicyGetResponseSuccess = true +) + +type AccessAppPolicyUpdateResponse struct { + Errors []AccessAppPolicyUpdateResponseError `json:"errors"` + Messages []AccessAppPolicyUpdateResponseMessage `json:"messages"` + Result AccessAppPolicyUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppPolicyUpdateResponseSuccess `json:"success"` + JSON accessAppPolicyUpdateResponseJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseJSON contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponse] +type accessAppPolicyUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyUpdateResponseErrorJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseError] +type accessAppPolicyUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyUpdateResponseMessageJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseMessageJSON contains the JSON metadata for the +// struct [AccessAppPolicyUpdateResponseMessage] +type accessAppPolicyUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyUpdateResponseResult struct { + // UUID + ID string `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups []AccessAppPolicyUpdateResponseResultApprovalGroup `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired bool `json:"approval_required"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The action Access will take if a user matches this policy. + Decision AccessAppPolicyUpdateResponseResultDecision `json:"decision"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessAppPolicyUpdateResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessAppPolicyUpdateResponseResultInclude `json:"include"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired bool `json:"isolation_required"` + // The name of the Access policy. + Name string `json:"name"` + // The order of execution for this policy. Must be unique for each policy. + Precedence int64 `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt string `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired bool `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require []AccessAppPolicyUpdateResponseResultRequire `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration string `json:"session_duration"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppPolicyUpdateResponseResultJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultJSON contains the JSON metadata for the +// struct [AccessAppPolicyUpdateResponseResult] +type accessAppPolicyUpdateResponseResultJSON struct { + ID apijson.Field + ApprovalGroups apijson.Field + ApprovalRequired apijson.Field + CreatedAt apijson.Field + Decision apijson.Field + Exclude apijson.Field + Include apijson.Field + IsolationRequired apijson.Field + Name apijson.Field + Precedence apijson.Field + PurposeJustificationPrompt apijson.Field + PurposeJustificationRequired apijson.Field + Require apijson.Field + SessionDuration apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyUpdateResponseResultApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded float64 `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses []interface{} `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid string `json:"email_list_uuid"` + JSON accessAppPolicyUpdateResponseResultApprovalGroupJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultApprovalGroupJSON contains the JSON metadata +// for the struct [AccessAppPolicyUpdateResponseResultApprovalGroup] +type accessAppPolicyUpdateResponseResultApprovalGroupJSON struct { + ApprovalsNeeded apijson.Field + EmailAddresses apijson.Field + EmailListUuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultApprovalGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyUpdateResponseResultDecision string + +const ( + AccessAppPolicyUpdateResponseResultDecisionAllow AccessAppPolicyUpdateResponseResultDecision = "allow" + AccessAppPolicyUpdateResponseResultDecisionDeny AccessAppPolicyUpdateResponseResultDecision = "deny" + AccessAppPolicyUpdateResponseResultDecisionNonIdentity AccessAppPolicyUpdateResponseResultDecision = "non_identity" + AccessAppPolicyUpdateResponseResultDecisionBypass AccessAppPolicyUpdateResponseResultDecision = "bypass" +) + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyUpdateResponseResultExcludeAccessEmailRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessDomainRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessEveryoneRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessIPRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessIPListRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessCertificateRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessCountryRule], +// [AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRule] or +// [AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRule]. +type AccessAppPolicyUpdateResponseResultExclude interface { + implementsAccessAppPolicyUpdateResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyUpdateResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyUpdateResponseResultExcludeAccessEmailRule struct { + Email AccessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessEmailRule] +type accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessEmailRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmail] +type accessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRule struct { + EmailList AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRule] +type accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailList] +type accessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessDomainRule] +type accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessDomainRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomain] +type accessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyUpdateResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessEveryoneRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessEveryoneRule] +type accessAppPolicyUpdateResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessEveryoneRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateResponseResultExcludeAccessIPRule struct { + IP AccessAppPolicyUpdateResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyUpdateResponseResultExcludeAccessIPRule] +type accessAppPolicyUpdateResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessIPRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessIPRuleIP] +type accessAppPolicyUpdateResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateResponseResultExcludeAccessIPListRule struct { + IPList AccessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessIPListRule] +type accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessIPListRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPList] +type accessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessCertificateRule] +type accessAppPolicyUpdateResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessCertificateRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRule struct { + Group AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRule] +type accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroup] +type accessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRule] +type accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRule] +type accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRule] +type accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRule] +type accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOkta] +type accessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRule] +type accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSaml] +type accessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRule] +type accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRule] +type accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyUpdateResponseResultExcludeAccessCountryRule struct { + Geo AccessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessCountryRule] +type accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessCountryRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeo] +type accessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRule] +type accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRule] +type accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRule) implementsAccessAppPolicyUpdateResponseResultExclude() { +} + +type AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyUpdateResponseResultIncludeAccessEmailRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessDomainRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessEveryoneRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessIPRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessIPListRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessCertificateRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessCountryRule], +// [AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRule] or +// [AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRule]. +type AccessAppPolicyUpdateResponseResultInclude interface { + implementsAccessAppPolicyUpdateResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyUpdateResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyUpdateResponseResultIncludeAccessEmailRule struct { + Email AccessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessEmailRule] +type accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessEmailRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmail] +type accessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRule struct { + EmailList AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRule] +type accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailList] +type accessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessDomainRule] +type accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessDomainRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomain] +type accessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyUpdateResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessEveryoneRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessEveryoneRule] +type accessAppPolicyUpdateResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessEveryoneRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateResponseResultIncludeAccessIPRule struct { + IP AccessAppPolicyUpdateResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyUpdateResponseResultIncludeAccessIPRule] +type accessAppPolicyUpdateResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessIPRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessIPRuleIP] +type accessAppPolicyUpdateResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateResponseResultIncludeAccessIPListRule struct { + IPList AccessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessIPListRule] +type accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessIPListRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPList] +type accessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessCertificateRule] +type accessAppPolicyUpdateResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessCertificateRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRule struct { + Group AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRule] +type accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroup] +type accessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRule] +type accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRule] +type accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRule] +type accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRule] +type accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOkta] +type accessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRule] +type accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSaml] +type accessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRule] +type accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRule] +type accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyUpdateResponseResultIncludeAccessCountryRule struct { + Geo AccessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessCountryRule] +type accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessCountryRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeo] +type accessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRule] +type accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRule] +type accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRule) implementsAccessAppPolicyUpdateResponseResultInclude() { +} + +type AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessAppPolicyUpdateResponseResultRequireAccessEmailRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessEmailListRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessDomainRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessEveryoneRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessIPRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessIPListRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessCertificateRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessCountryRule], +// [AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRule] or +// [AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRule]. +type AccessAppPolicyUpdateResponseResultRequire interface { + implementsAccessAppPolicyUpdateResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyUpdateResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyUpdateResponseResultRequireAccessEmailRule struct { + Email AccessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessEmailRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessEmailRule] +type accessAppPolicyUpdateResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessEmailRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmail] +type accessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateResponseResultRequireAccessEmailListRule struct { + EmailList AccessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessEmailListRule] +type accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessEmailListRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailList] +type accessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateResponseResultRequireAccessDomainRule struct { + EmailDomain AccessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessDomainRule] +type accessAppPolicyUpdateResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessDomainRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomain] +type accessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyUpdateResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessEveryoneRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessEveryoneRule] +type accessAppPolicyUpdateResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessEveryoneRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateResponseResultRequireAccessIPRule struct { + IP AccessAppPolicyUpdateResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessAppPolicyUpdateResponseResultRequireAccessIPRule] +type accessAppPolicyUpdateResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessIPRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessIPRuleIPJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessIPRuleIP] +type accessAppPolicyUpdateResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateResponseResultRequireAccessIPListRule struct { + IPList AccessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessIPListRule] +type accessAppPolicyUpdateResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessIPListRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPListJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPList] +type accessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessCertificateRule] +type accessAppPolicyUpdateResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessCertificateRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRule struct { + Group AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRule] +type accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroup] +type accessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRule] +type accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRule] +type accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRule] +type accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRule struct { + Okta AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRule] +type accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOkta] +type accessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRule struct { + Saml AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRule] +type accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSaml] +type accessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRule] +type accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRule] +type accessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRule] +type accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyUpdateResponseResultRequireAccessCountryRule struct { + Geo AccessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessCountryRuleJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessCountryRule] +type accessAppPolicyUpdateResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessCountryRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeo] +type accessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRule] +type accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRule] +type accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRule) implementsAccessAppPolicyUpdateResponseResultRequire() { +} + +type AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppPolicyUpdateResponseSuccess bool + +const ( + AccessAppPolicyUpdateResponseSuccessTrue AccessAppPolicyUpdateResponseSuccess = true +) + +type AccessAppPolicyDeleteResponse struct { + Errors []AccessAppPolicyDeleteResponseError `json:"errors"` + Messages []AccessAppPolicyDeleteResponseMessage `json:"messages"` + Result AccessAppPolicyDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppPolicyDeleteResponseSuccess `json:"success"` + JSON accessAppPolicyDeleteResponseJSON `json:"-"` +} + +// accessAppPolicyDeleteResponseJSON contains the JSON metadata for the struct +// [AccessAppPolicyDeleteResponse] +type accessAppPolicyDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyDeleteResponseErrorJSON `json:"-"` +} + +// accessAppPolicyDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccessAppPolicyDeleteResponseError] +type accessAppPolicyDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyDeleteResponseMessageJSON `json:"-"` +} + +// accessAppPolicyDeleteResponseMessageJSON contains the JSON metadata for the +// struct [AccessAppPolicyDeleteResponseMessage] +type accessAppPolicyDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessAppPolicyDeleteResponseResultJSON `json:"-"` +} + +// accessAppPolicyDeleteResponseResultJSON contains the JSON metadata for the +// struct [AccessAppPolicyDeleteResponseResult] +type accessAppPolicyDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppPolicyDeleteResponseSuccess bool + +const ( + AccessAppPolicyDeleteResponseSuccessTrue AccessAppPolicyDeleteResponseSuccess = true +) + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse struct { + Errors []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseError `json:"errors"` + Messages []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessage `json:"messages"` + Result AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseSuccess `json:"success"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseJSON contains the JSON +// metadata for the struct [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseErrorJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseErrorJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseError] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessageJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessageJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessage] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResult struct { + // UUID + ID string `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroup `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired bool `json:"approval_required"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The action Access will take if a user matches this policy. + Decision AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision `json:"decision"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude `json:"include"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired bool `json:"isolation_required"` + // The name of the Access policy. + Name string `json:"name"` + // The order of execution for this policy. Must be unique for each policy. + Precedence int64 `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt string `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired bool `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require []AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration string `json:"session_duration"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResult] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultJSON struct { + ID apijson.Field + ApprovalGroups apijson.Field + ApprovalRequired apijson.Field + CreatedAt apijson.Field + Decision apijson.Field + Exclude apijson.Field + Include apijson.Field + IsolationRequired apijson.Field + Name apijson.Field + Precedence apijson.Field + PurposeJustificationPrompt apijson.Field + PurposeJustificationRequired apijson.Field + Require apijson.Field + SessionDuration apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded float64 `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses []interface{} `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid string `json:"email_list_uuid"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroup] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroupJSON struct { + ApprovalsNeeded apijson.Field + EmailAddresses apijson.Field + EmailListUuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultApprovalGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision string + +const ( + AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecisionAllow AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision = "allow" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecisionDeny AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision = "deny" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecisionNonIdentity AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision = "non_identity" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecisionBypass AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultDecision = "bypass" +) + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIP] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIP] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIP] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseSuccess bool + +const ( + AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseSuccessTrue AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponseSuccess = true +) + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponse struct { + Errors []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseError `json:"errors"` + Messages []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseMessage `json:"messages"` + Result []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResult `json:"result"` + ResultInfo AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessAppPolicyAccessPoliciesListAccessPoliciesResponseSuccess `json:"success"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseJSON contains the JSON +// metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponse] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseErrorJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseErrorJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseError] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseMessageJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseMessageJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseMessage] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResult struct { + // UUID + ID string `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroup `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired bool `json:"approval_required"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The action Access will take if a user matches this policy. + Decision AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision `json:"decision"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude `json:"include"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired bool `json:"isolation_required"` + // The name of the Access policy. + Name string `json:"name"` + // The order of execution for this policy. Must be unique for each policy. + Precedence int64 `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt string `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired bool `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require []AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration string `json:"session_duration"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultJSON contains the +// JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResult] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultJSON struct { + ID apijson.Field + ApprovalGroups apijson.Field + ApprovalRequired apijson.Field + CreatedAt apijson.Field + Decision apijson.Field + Exclude apijson.Field + Include apijson.Field + IsolationRequired apijson.Field + Name apijson.Field + Precedence apijson.Field + PurposeJustificationPrompt apijson.Field + PurposeJustificationRequired apijson.Field + Require apijson.Field + SessionDuration apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded float64 `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses []interface{} `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid string `json:"email_list_uuid"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroup] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroupJSON struct { + ApprovalsNeeded apijson.Field + EmailAddresses apijson.Field + EmailListUuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultApprovalGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision string + +const ( + AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecisionAllow AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision = "allow" + AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecisionDeny AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision = "deny" + AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecisionNonIdentity AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision = "non_identity" + AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecisionBypass AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultDecision = "bypass" +) + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude interface { + implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIP] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude interface { + implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIP] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInclude() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRule], +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRule] +// or +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire interface { + implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRule struct { + Email AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmail] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRule struct { + EmailList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRule struct { + EmailDomain AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomain] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRule struct { + IP AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIP] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRule struct { + IPList AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPList] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRule struct { + Group AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroup] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRule struct { + Okta AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOkta] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRule struct { + Saml AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSaml] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRule struct { + Geo AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeo] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRule] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequire() { +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfoJSON `json:"-"` +} + +// accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfoJSON contains +// the JSON metadata for the struct +// [AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfo] +type accessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppPolicyAccessPoliciesListAccessPoliciesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppPolicyAccessPoliciesListAccessPoliciesResponseSuccess bool + +const ( + AccessAppPolicyAccessPoliciesListAccessPoliciesResponseSuccessTrue AccessAppPolicyAccessPoliciesListAccessPoliciesResponseSuccess = true +) + +type AccessAppPolicyUpdateParams struct { + // The action Access will take if a user matches this policy. + Decision param.Field[AccessAppPolicyUpdateParamsDecision] `json:"decision,required"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include param.Field[[]AccessAppPolicyUpdateParamsInclude] `json:"include,required"` + // The name of the Access policy. + Name param.Field[string] `json:"name,required"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]AccessAppPolicyUpdateParamsApprovalGroup] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude param.Field[[]AccessAppPolicyUpdateParamsExclude] `json:"exclude"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require param.Field[[]AccessAppPolicyUpdateParamsRequire] `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessAppPolicyUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyUpdateParamsDecision string + +const ( + AccessAppPolicyUpdateParamsDecisionAllow AccessAppPolicyUpdateParamsDecision = "allow" + AccessAppPolicyUpdateParamsDecisionDeny AccessAppPolicyUpdateParamsDecision = "deny" + AccessAppPolicyUpdateParamsDecisionNonIdentity AccessAppPolicyUpdateParamsDecision = "non_identity" + AccessAppPolicyUpdateParamsDecisionBypass AccessAppPolicyUpdateParamsDecision = "bypass" +) + +// Matches a specific email. +// +// Satisfied by [AccessAppPolicyUpdateParamsIncludeAccessEmailRule], +// [AccessAppPolicyUpdateParamsIncludeAccessEmailListRule], +// [AccessAppPolicyUpdateParamsIncludeAccessDomainRule], +// [AccessAppPolicyUpdateParamsIncludeAccessEveryoneRule], +// [AccessAppPolicyUpdateParamsIncludeAccessIPRule], +// [AccessAppPolicyUpdateParamsIncludeAccessIPListRule], +// [AccessAppPolicyUpdateParamsIncludeAccessCertificateRule], +// [AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRule], +// [AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRule], +// [AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRule], +// [AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRule], +// [AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRule], +// [AccessAppPolicyUpdateParamsIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateParamsIncludeAccessCountryRule], +// [AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRule], +// [AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRule]. +type AccessAppPolicyUpdateParamsInclude interface { + implementsAccessAppPolicyUpdateParamsInclude() +} + +// Matches a specific email. +type AccessAppPolicyUpdateParamsIncludeAccessEmailRule struct { + Email param.Field[AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateParamsIncludeAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyUpdateParamsIncludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailListRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateParamsIncludeAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyUpdateParamsIncludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDomainRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyUpdateParamsIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessEveryoneRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateParamsIncludeAccessIPRule struct { + IP param.Field[AccessAppPolicyUpdateParamsIncludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateParamsIncludeAccessIPListRule struct { + IPList param.Field[AccessAppPolicyUpdateParamsIncludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPListRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateParamsIncludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessCertificateRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateParamsIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyUpdateParamsIncludeAccessCountryRule struct { + Geo param.Field[AccessAppPolicyUpdateParamsIncludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessCountryRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRule) implementsAccessAppPolicyUpdateParamsInclude() { +} + +type AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyUpdateParamsIncludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyUpdateParamsApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded param.Field[float64] `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses param.Field[[]interface{}] `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid param.Field[string] `json:"email_list_uuid"` +} + +func (r AccessAppPolicyUpdateParamsApprovalGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by [AccessAppPolicyUpdateParamsExcludeAccessEmailRule], +// [AccessAppPolicyUpdateParamsExcludeAccessEmailListRule], +// [AccessAppPolicyUpdateParamsExcludeAccessDomainRule], +// [AccessAppPolicyUpdateParamsExcludeAccessEveryoneRule], +// [AccessAppPolicyUpdateParamsExcludeAccessIPRule], +// [AccessAppPolicyUpdateParamsExcludeAccessIPListRule], +// [AccessAppPolicyUpdateParamsExcludeAccessCertificateRule], +// [AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRule], +// [AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRule], +// [AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRule], +// [AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRule], +// [AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRule], +// [AccessAppPolicyUpdateParamsExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateParamsExcludeAccessCountryRule], +// [AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRule], +// [AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRule]. +type AccessAppPolicyUpdateParamsExclude interface { + implementsAccessAppPolicyUpdateParamsExclude() +} + +// Matches a specific email. +type AccessAppPolicyUpdateParamsExcludeAccessEmailRule struct { + Email param.Field[AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateParamsExcludeAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyUpdateParamsExcludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailListRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateParamsExcludeAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyUpdateParamsExcludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDomainRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyUpdateParamsExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessEveryoneRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateParamsExcludeAccessIPRule struct { + IP param.Field[AccessAppPolicyUpdateParamsExcludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateParamsExcludeAccessIPListRule struct { + IPList param.Field[AccessAppPolicyUpdateParamsExcludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPListRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateParamsExcludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessCertificateRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateParamsExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyUpdateParamsExcludeAccessCountryRule struct { + Geo param.Field[AccessAppPolicyUpdateParamsExcludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessCountryRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRule) implementsAccessAppPolicyUpdateParamsExclude() { +} + +type AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyUpdateParamsExcludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by [AccessAppPolicyUpdateParamsRequireAccessEmailRule], +// [AccessAppPolicyUpdateParamsRequireAccessEmailListRule], +// [AccessAppPolicyUpdateParamsRequireAccessDomainRule], +// [AccessAppPolicyUpdateParamsRequireAccessEveryoneRule], +// [AccessAppPolicyUpdateParamsRequireAccessIPRule], +// [AccessAppPolicyUpdateParamsRequireAccessIPListRule], +// [AccessAppPolicyUpdateParamsRequireAccessCertificateRule], +// [AccessAppPolicyUpdateParamsRequireAccessAccessGroupRule], +// [AccessAppPolicyUpdateParamsRequireAccessAzureGroupRule], +// [AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRule], +// [AccessAppPolicyUpdateParamsRequireAccessOktaGroupRule], +// [AccessAppPolicyUpdateParamsRequireAccessSamlGroupRule], +// [AccessAppPolicyUpdateParamsRequireAccessServiceTokenRule], +// [AccessAppPolicyUpdateParamsRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRule], +// [AccessAppPolicyUpdateParamsRequireAccessCountryRule], +// [AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRule], +// [AccessAppPolicyUpdateParamsRequireAccessDevicePostureRule]. +type AccessAppPolicyUpdateParamsRequire interface { + implementsAccessAppPolicyUpdateParamsRequire() +} + +// Matches a specific email. +type AccessAppPolicyUpdateParamsRequireAccessEmailRule struct { + Email param.Field[AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyUpdateParamsRequireAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyUpdateParamsRequireAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailListRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyUpdateParamsRequireAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyUpdateParamsRequireAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDomainRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyUpdateParamsRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessEveryoneRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyUpdateParamsRequireAccessIPRule struct { + IP param.Field[AccessAppPolicyUpdateParamsRequireAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyUpdateParamsRequireAccessIPListRule struct { + IPList param.Field[AccessAppPolicyUpdateParamsRequireAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPListRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyUpdateParamsRequireAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessCertificateRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +// Matches an Access group. +type AccessAppPolicyUpdateParamsRequireAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyUpdateParamsRequireAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAccessGroupRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyUpdateParamsRequireAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyUpdateParamsRequireAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAzureGroupRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyUpdateParamsRequireAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyUpdateParamsRequireAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessOktaGroupRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyUpdateParamsRequireAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyUpdateParamsRequireAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessSamlGroupRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyUpdateParamsRequireAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyUpdateParamsRequireAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessServiceTokenRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyUpdateParamsRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyUpdateParamsRequireAccessCountryRule struct { + Geo param.Field[AccessAppPolicyUpdateParamsRequireAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessCountryRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyUpdateParamsRequireAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyUpdateParamsRequireAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDevicePostureRule) implementsAccessAppPolicyUpdateParamsRequire() { +} + +type AccessAppPolicyUpdateParamsRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyUpdateParamsRequireAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParams struct { + // The action Access will take if a user matches this policy. + Decision param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision] `json:"decision,required"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include param.Field[[]AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude] `json:"include,required"` + // The name of the Access policy. + Name param.Field[string] `json:"name,required"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsApprovalGroup] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Rules evaluated with a NOT logical operator. To match the policy, a user cannot + // meet any of the Exclude rules. + Exclude param.Field[[]AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude] `json:"exclude"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // Rules evaluated with an AND logical operator. To match the policy, a user must + // meet all of the Require rules. + Require param.Field[[]AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire] `json:"require"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The action Access will take if a user matches this policy. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision string + +const ( + AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecisionAllow AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision = "allow" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecisionDeny AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision = "deny" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecisionNonIdentity AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision = "non_identity" + AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecisionBypass AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecision = "bypass" +) + +// Matches a specific email. +// +// Satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule struct { + Email param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRule struct { + IP param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRule struct { + IPList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRule struct { + Geo param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A group of email addresses that can approve a temporary authentication request. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsApprovalGroup struct { + // The number of approvals needed to obtain access. + ApprovalsNeeded param.Field[float64] `json:"approvals_needed,required"` + // A list of emails that can approve the access request. + EmailAddresses param.Field[[]interface{}] `json:"email_addresses"` + // The UUID of an re-usable email list. + EmailListUuid param.Field[string] `json:"email_list_uuid"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsApprovalGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule struct { + Email param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRule struct { + IP param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRule struct { + IPList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRule struct { + Geo param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEveryoneRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCertificateRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAnyValidServiceTokenRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRule], +// [AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRule]. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire interface { + implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() +} + +// Matches a specific email. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule struct { + Email param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRule struct { + EmailList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRule struct { + EmailDomain param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEveryoneRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +// Matches an IP address block. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRule struct { + IP param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRule struct { + IPList param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCertificateRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +// Matches an Access group. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRule struct { + Group param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRule struct { + AzureAd param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRule struct { + Okta param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRule struct { + Saml param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRule struct { + ServiceToken param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAnyValidServiceTokenRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRule struct { + Geo param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRule struct { + DevicePosture param.Field[AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRule) implementsAccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire() { +} + +type AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accessapppolicy_test.go b/accessapppolicy_test.go new file mode 100644 index 00000000000..708f7f54185 --- /dev/null +++ b/accessapppolicy_test.go @@ -0,0 +1,288 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessAppPolicyGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Policies.Get( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppPolicyUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Policies.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessAppPolicyUpdateParams{ + Decision: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsDecisionAllow), + Include: cloudflare.F([]cloudflare.AccessAppPolicyUpdateParamsInclude{cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + Name: cloudflare.F("Allow devs"), + ApprovalGroups: cloudflare.F([]cloudflare.AccessAppPolicyUpdateParamsApprovalGroup{{ + ApprovalsNeeded: cloudflare.F(1.000000), + EmailAddresses: cloudflare.F([]interface{}{"test1@cloudflare.com", "test2@cloudflare.com"}), + EmailListUuid: cloudflare.F("string"), + }, { + ApprovalsNeeded: cloudflare.F(3.000000), + EmailAddresses: cloudflare.F([]interface{}{"test@cloudflare.com", "test2@cloudflare.com"}), + EmailListUuid: cloudflare.F("597147a1-976b-4ef2-9af0-81d5d007fc34"), + }}), + ApprovalRequired: cloudflare.F(true), + Exclude: cloudflare.F([]cloudflare.AccessAppPolicyUpdateParamsExclude{cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + IsolationRequired: cloudflare.F(false), + Precedence: cloudflare.F(int64(0)), + PurposeJustificationPrompt: cloudflare.F("Please enter a justification for entering this protected domain."), + PurposeJustificationRequired: cloudflare.F(true), + Require: cloudflare.F([]cloudflare.AccessAppPolicyUpdateParamsRequire{cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + SessionDuration: cloudflare.F("24h"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppPolicyDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Policies.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppPolicyAccessPoliciesNewAnAccessPolicyWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Policies.AccessPoliciesNewAnAccessPolicy( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParams{ + Decision: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsDecisionAllow), + Include: cloudflare.F([]cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsInclude{cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + Name: cloudflare.F("Allow devs"), + ApprovalGroups: cloudflare.F([]cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsApprovalGroup{{ + ApprovalsNeeded: cloudflare.F(1.000000), + EmailAddresses: cloudflare.F([]interface{}{"test1@cloudflare.com", "test2@cloudflare.com"}), + EmailListUuid: cloudflare.F("string"), + }, { + ApprovalsNeeded: cloudflare.F(3.000000), + EmailAddresses: cloudflare.F([]interface{}{"test@cloudflare.com", "test2@cloudflare.com"}), + EmailListUuid: cloudflare.F("597147a1-976b-4ef2-9af0-81d5d007fc34"), + }}), + ApprovalRequired: cloudflare.F(true), + Exclude: cloudflare.F([]cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExclude{cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + IsolationRequired: cloudflare.F(false), + Precedence: cloudflare.F(int64(0)), + PurposeJustificationPrompt: cloudflare.F("Please enter a justification for entering this protected domain."), + PurposeJustificationRequired: cloudflare.F(true), + Require: cloudflare.F([]cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequire{cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + SessionDuration: cloudflare.F("24h"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessAppPolicyAccessPoliciesListAccessPolicies(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.Policies.AccessPoliciesListAccessPolicies( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessapprevoketoken.go b/accessapprevoketoken.go new file mode 100644 index 00000000000..8950b268dd1 --- /dev/null +++ b/accessapprevoketoken.go @@ -0,0 +1,73 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessAppRevokeTokenService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessAppRevokeTokenService] +// method instead. +type AccessAppRevokeTokenService struct { + Options []option.RequestOption +} + +// NewAccessAppRevokeTokenService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessAppRevokeTokenService(opts ...option.RequestOption) (r *AccessAppRevokeTokenService) { + r = &AccessAppRevokeTokenService{} + r.Options = opts + return +} + +// Revokes all tokens issued for an application. +func (r *AccessAppRevokeTokenService) AccessApplicationsRevokeServiceTokens(ctx context.Context, accountOrZone string, accountOrZoneID string, appID AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensParamsAppID, opts ...option.RequestOption) (res *AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%v/revoke_tokens", accountOrZone, accountOrZoneID, appID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse struct { + Result interface{} `json:"result,nullable"` + Success AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccess `json:"success"` + JSON accessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseJSON `json:"-"` +} + +// accessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseJSON contains +// the JSON metadata for the struct +// [AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse] +type accessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccess bool + +const ( + AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccessTrue AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccess = true + AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccessFalse AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponseSuccess = false +) + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensParamsAppID interface { + ImplementsAccessAppRevokeTokenAccessApplicationsRevokeServiceTokensParamsAppID() +} diff --git a/accessapprevoketoken_test.go b/accessapprevoketoken_test.go new file mode 100644 index 00000000000..8aacb8b02ad --- /dev/null +++ b/accessapprevoketoken_test.go @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessAppRevokeTokenAccessApplicationsRevokeServiceTokens(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.RevokeTokens.AccessApplicationsRevokeServiceTokens( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"), + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessappuserpolicycheck.go b/accessappuserpolicycheck.go new file mode 100644 index 00000000000..77fea768343 --- /dev/null +++ b/accessappuserpolicycheck.go @@ -0,0 +1,224 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessAppUserPolicyCheckService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewAccessAppUserPolicyCheckService] method instead. +type AccessAppUserPolicyCheckService struct { + Options []option.RequestOption +} + +// NewAccessAppUserPolicyCheckService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewAccessAppUserPolicyCheckService(opts ...option.RequestOption) (r *AccessAppUserPolicyCheckService) { + r = &AccessAppUserPolicyCheckService{} + r.Options = opts + return +} + +// Tests if a specific user has permission to access an application. +func (r *AccessAppUserPolicyCheckService) AccessApplicationsTestAccessPolicies(ctx context.Context, accountOrZone string, accountOrZoneID string, appID AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesParamsAppID, opts ...option.RequestOption) (res *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/apps/%v/user_policy_checks", accountOrZone, accountOrZoneID, appID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse struct { + Errors []AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseError `json:"errors"` + Messages []AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessage `json:"messages"` + Result AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResult `json:"result"` + // Whether the API call was successful + Success AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseSuccess `json:"success"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseErrorJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseError] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessageJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessage] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResult struct { + AppState AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppState `json:"app_state"` + UserIdentity AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentity `json:"user_identity"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResult] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultJSON struct { + AppState apijson.Field + UserIdentity apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppState struct { + // UUID + AppUid string `json:"app_uid"` + Aud string `json:"aud"` + Hostname string `json:"hostname"` + Name string `json:"name"` + Policies []interface{} `json:"policies"` + Status string `json:"status"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppStateJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppStateJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppState] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppStateJSON struct { + AppUid apijson.Field + Aud apijson.Field + Hostname apijson.Field + Name apijson.Field + Policies apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultAppState) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentity struct { + ID string `json:"id"` + AccountID string `json:"account_id"` + DeviceSessions interface{} `json:"device_sessions"` + Email string `json:"email"` + Geo AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeo `json:"geo"` + Iat int64 `json:"iat"` + IsGateway bool `json:"is_gateway"` + IsWarp bool `json:"is_warp"` + Name string `json:"name"` + // UUID + UserUuid string `json:"user_uuid"` + Version int64 `json:"version"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentity] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityJSON struct { + ID apijson.Field + AccountID apijson.Field + DeviceSessions apijson.Field + Email apijson.Field + Geo apijson.Field + Iat apijson.Field + IsGateway apijson.Field + IsWarp apijson.Field + Name apijson.Field + UserUuid apijson.Field + Version apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentity) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeo struct { + Country string `json:"country"` + JSON accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeoJSON `json:"-"` +} + +// accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeoJSON +// contains the JSON metadata for the struct +// [AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeo] +type accessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeoJSON struct { + Country apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseResultUserIdentityGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseSuccess bool + +const ( + AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseSuccessTrue AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponseSuccess = true +) + +// Identifier +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesParamsAppID interface { + ImplementsAccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesParamsAppID() +} diff --git a/accessappuserpolicycheck_test.go b/accessappuserpolicycheck_test.go new file mode 100644 index 00000000000..84b2bad235a --- /dev/null +++ b/accessappuserpolicycheck_test.go @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessAppUserPolicyCheckAccessApplicationsTestAccessPolicies(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Apps.UserPolicyChecks.AccessApplicationsTestAccessPolicies( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"), + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessbookmark.go b/accessbookmark.go new file mode 100644 index 00000000000..45b059d65eb --- /dev/null +++ b/accessbookmark.go @@ -0,0 +1,494 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessBookmarkService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessBookmarkService] method +// instead. +type AccessBookmarkService struct { + Options []option.RequestOption +} + +// NewAccessBookmarkService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessBookmarkService(opts ...option.RequestOption) (r *AccessBookmarkService) { + r = &AccessBookmarkService{} + r.Options = opts + return +} + +// Fetches a single Bookmark application. +func (r *AccessBookmarkService) Get(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarkGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates a configured Bookmark application. +func (r *AccessBookmarkService) Update(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarkUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &res, opts...) + return +} + +// Deletes a Bookmark application. +func (r *AccessBookmarkService) Delete(ctx context.Context, identifier interface{}, uuid string, opts ...option.RequestOption) (res *AccessBookmarkDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/access/bookmarks/%s", identifier, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Lists Bookmark applications. +func (r *AccessBookmarkService) AccessBookmarkApplicationsDeprecatedListBookmarkApplications(ctx context.Context, identifier interface{}, opts ...option.RequestOption) (res *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/access/bookmarks", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessBookmarkGetResponse struct { + Errors []AccessBookmarkGetResponseError `json:"errors"` + Messages []AccessBookmarkGetResponseMessage `json:"messages"` + Result AccessBookmarkGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessBookmarkGetResponseSuccess `json:"success"` + JSON accessBookmarkGetResponseJSON `json:"-"` +} + +// accessBookmarkGetResponseJSON contains the JSON metadata for the struct +// [AccessBookmarkGetResponse] +type accessBookmarkGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkGetResponseErrorJSON `json:"-"` +} + +// accessBookmarkGetResponseErrorJSON contains the JSON metadata for the struct +// [AccessBookmarkGetResponseError] +type accessBookmarkGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkGetResponseMessageJSON `json:"-"` +} + +// accessBookmarkGetResponseMessageJSON contains the JSON metadata for the struct +// [AccessBookmarkGetResponseMessage] +type accessBookmarkGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkGetResponseResult struct { + // The unique identifier for the Bookmark application. + ID interface{} `json:"id"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The domain of the Bookmark application. + Domain string `json:"domain"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the Bookmark application. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessBookmarkGetResponseResultJSON `json:"-"` +} + +// accessBookmarkGetResponseResultJSON contains the JSON metadata for the struct +// [AccessBookmarkGetResponseResult] +type accessBookmarkGetResponseResultJSON struct { + ID apijson.Field + AppLauncherVisible apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + LogoURL apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessBookmarkGetResponseSuccess bool + +const ( + AccessBookmarkGetResponseSuccessTrue AccessBookmarkGetResponseSuccess = true +) + +type AccessBookmarkUpdateResponse struct { + Errors []AccessBookmarkUpdateResponseError `json:"errors"` + Messages []AccessBookmarkUpdateResponseMessage `json:"messages"` + Result AccessBookmarkUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessBookmarkUpdateResponseSuccess `json:"success"` + JSON accessBookmarkUpdateResponseJSON `json:"-"` +} + +// accessBookmarkUpdateResponseJSON contains the JSON metadata for the struct +// [AccessBookmarkUpdateResponse] +type accessBookmarkUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkUpdateResponseErrorJSON `json:"-"` +} + +// accessBookmarkUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccessBookmarkUpdateResponseError] +type accessBookmarkUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkUpdateResponseMessageJSON `json:"-"` +} + +// accessBookmarkUpdateResponseMessageJSON contains the JSON metadata for the +// struct [AccessBookmarkUpdateResponseMessage] +type accessBookmarkUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkUpdateResponseResult struct { + // The unique identifier for the Bookmark application. + ID interface{} `json:"id"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The domain of the Bookmark application. + Domain string `json:"domain"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the Bookmark application. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessBookmarkUpdateResponseResultJSON `json:"-"` +} + +// accessBookmarkUpdateResponseResultJSON contains the JSON metadata for the struct +// [AccessBookmarkUpdateResponseResult] +type accessBookmarkUpdateResponseResultJSON struct { + ID apijson.Field + AppLauncherVisible apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + LogoURL apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessBookmarkUpdateResponseSuccess bool + +const ( + AccessBookmarkUpdateResponseSuccessTrue AccessBookmarkUpdateResponseSuccess = true +) + +type AccessBookmarkDeleteResponse struct { + Errors []AccessBookmarkDeleteResponseError `json:"errors"` + Messages []AccessBookmarkDeleteResponseMessage `json:"messages"` + Result AccessBookmarkDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessBookmarkDeleteResponseSuccess `json:"success"` + JSON accessBookmarkDeleteResponseJSON `json:"-"` +} + +// accessBookmarkDeleteResponseJSON contains the JSON metadata for the struct +// [AccessBookmarkDeleteResponse] +type accessBookmarkDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkDeleteResponseErrorJSON `json:"-"` +} + +// accessBookmarkDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccessBookmarkDeleteResponseError] +type accessBookmarkDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkDeleteResponseMessageJSON `json:"-"` +} + +// accessBookmarkDeleteResponseMessageJSON contains the JSON metadata for the +// struct [AccessBookmarkDeleteResponseMessage] +type accessBookmarkDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessBookmarkDeleteResponseResultJSON `json:"-"` +} + +// accessBookmarkDeleteResponseResultJSON contains the JSON metadata for the struct +// [AccessBookmarkDeleteResponseResult] +type accessBookmarkDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessBookmarkDeleteResponseSuccess bool + +const ( + AccessBookmarkDeleteResponseSuccessTrue AccessBookmarkDeleteResponseSuccess = true +) + +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse struct { + Errors []AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseError `json:"errors"` + Messages []AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessage `json:"messages"` + Result []AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResult `json:"result"` + ResultInfo AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseSuccess `json:"success"` + JSON accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseJSON `json:"-"` +} + +// accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseJSON +// contains the JSON metadata for the struct +// [AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse] +type accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseErrorJSON `json:"-"` +} + +// accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseError] +type accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessageJSON `json:"-"` +} + +// accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessage] +type accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResult struct { + // The unique identifier for the Bookmark application. + ID interface{} `json:"id"` + // Displays the application in the App Launcher. + AppLauncherVisible bool `json:"app_launcher_visible"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The domain of the Bookmark application. + Domain string `json:"domain"` + // The image URL for the logo shown in the App Launcher dashboard. + LogoURL string `json:"logo_url"` + // The name of the Bookmark application. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultJSON `json:"-"` +} + +// accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultJSON +// contains the JSON metadata for the struct +// [AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResult] +type accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultJSON struct { + ID apijson.Field + AppLauncherVisible apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + LogoURL apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfoJSON `json:"-"` +} + +// accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfo] +type accessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseSuccess bool + +const ( + AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseSuccessTrue AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponseSuccess = true +) diff --git a/accessbookmark_test.go b/accessbookmark_test.go new file mode 100644 index 00000000000..94274924797 --- /dev/null +++ b/accessbookmark_test.go @@ -0,0 +1,130 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessBookmarkGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Bookmarks.Get( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessBookmarkUpdate(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Bookmarks.Update( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessBookmarkDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Bookmarks.Delete( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplications(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Bookmarks.AccessBookmarkApplicationsDeprecatedListBookmarkApplications(context.TODO(), "699d98642c564d2e855e9661899b7252") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accesscertificate.go b/accesscertificate.go new file mode 100644 index 00000000000..f352c8a18f6 --- /dev/null +++ b/accesscertificate.go @@ -0,0 +1,630 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessCertificateService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessCertificateService] method +// instead. +type AccessCertificateService struct { + Options []option.RequestOption +} + +// NewAccessCertificateService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessCertificateService(opts ...option.RequestOption) (r *AccessCertificateService) { + r = &AccessCertificateService{} + r.Options = opts + return +} + +// Fetches a single mTLS certificate. +func (r *AccessCertificateService) Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessCertificateGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/certificates/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates a configured mTLS certificate. +func (r *AccessCertificateService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body AccessCertificateUpdateParams, opts ...option.RequestOption) (res *AccessCertificateUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/certificates/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Deletes an mTLS certificate. +func (r *AccessCertificateService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessCertificateDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/certificates/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Adds a new mTLS root certificate to Access. +func (r *AccessCertificateService) AccessMTLSAuthenticationAddAnMTLSCertificate(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateParams, opts ...option.RequestOption) (res *AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/certificates", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists all mTLS root certificates. +func (r *AccessCertificateService) AccessMTLSAuthenticationListMTLSCertificates(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/certificates", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessCertificateGetResponse struct { + Errors []AccessCertificateGetResponseError `json:"errors"` + Messages []AccessCertificateGetResponseMessage `json:"messages"` + Result AccessCertificateGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessCertificateGetResponseSuccess `json:"success"` + JSON accessCertificateGetResponseJSON `json:"-"` +} + +// accessCertificateGetResponseJSON contains the JSON metadata for the struct +// [AccessCertificateGetResponse] +type accessCertificateGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateGetResponseErrorJSON `json:"-"` +} + +// accessCertificateGetResponseErrorJSON contains the JSON metadata for the struct +// [AccessCertificateGetResponseError] +type accessCertificateGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateGetResponseMessageJSON `json:"-"` +} + +// accessCertificateGetResponseMessageJSON contains the JSON metadata for the +// struct [AccessCertificateGetResponseMessage] +type accessCertificateGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateGetResponseResult struct { + // The ID of the application that will use this certificate. + ID interface{} `json:"id"` + // The hostnames of the applications that will use this certificate. + AssociatedHostnames []string `json:"associated_hostnames"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // The MD5 fingerprint of the certificate. + Fingerprint string `json:"fingerprint"` + // The name of the certificate. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessCertificateGetResponseResultJSON `json:"-"` +} + +// accessCertificateGetResponseResultJSON contains the JSON metadata for the struct +// [AccessCertificateGetResponseResult] +type accessCertificateGetResponseResultJSON struct { + ID apijson.Field + AssociatedHostnames apijson.Field + CreatedAt apijson.Field + ExpiresOn apijson.Field + Fingerprint apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessCertificateGetResponseSuccess bool + +const ( + AccessCertificateGetResponseSuccessTrue AccessCertificateGetResponseSuccess = true +) + +type AccessCertificateUpdateResponse struct { + Errors []AccessCertificateUpdateResponseError `json:"errors"` + Messages []AccessCertificateUpdateResponseMessage `json:"messages"` + Result AccessCertificateUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessCertificateUpdateResponseSuccess `json:"success"` + JSON accessCertificateUpdateResponseJSON `json:"-"` +} + +// accessCertificateUpdateResponseJSON contains the JSON metadata for the struct +// [AccessCertificateUpdateResponse] +type accessCertificateUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateUpdateResponseErrorJSON `json:"-"` +} + +// accessCertificateUpdateResponseErrorJSON contains the JSON metadata for the +// struct [AccessCertificateUpdateResponseError] +type accessCertificateUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateUpdateResponseMessageJSON `json:"-"` +} + +// accessCertificateUpdateResponseMessageJSON contains the JSON metadata for the +// struct [AccessCertificateUpdateResponseMessage] +type accessCertificateUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateUpdateResponseResult struct { + // The ID of the application that will use this certificate. + ID interface{} `json:"id"` + // The hostnames of the applications that will use this certificate. + AssociatedHostnames []string `json:"associated_hostnames"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // The MD5 fingerprint of the certificate. + Fingerprint string `json:"fingerprint"` + // The name of the certificate. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessCertificateUpdateResponseResultJSON `json:"-"` +} + +// accessCertificateUpdateResponseResultJSON contains the JSON metadata for the +// struct [AccessCertificateUpdateResponseResult] +type accessCertificateUpdateResponseResultJSON struct { + ID apijson.Field + AssociatedHostnames apijson.Field + CreatedAt apijson.Field + ExpiresOn apijson.Field + Fingerprint apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessCertificateUpdateResponseSuccess bool + +const ( + AccessCertificateUpdateResponseSuccessTrue AccessCertificateUpdateResponseSuccess = true +) + +type AccessCertificateDeleteResponse struct { + Errors []AccessCertificateDeleteResponseError `json:"errors"` + Messages []AccessCertificateDeleteResponseMessage `json:"messages"` + Result AccessCertificateDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessCertificateDeleteResponseSuccess `json:"success"` + JSON accessCertificateDeleteResponseJSON `json:"-"` +} + +// accessCertificateDeleteResponseJSON contains the JSON metadata for the struct +// [AccessCertificateDeleteResponse] +type accessCertificateDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateDeleteResponseErrorJSON `json:"-"` +} + +// accessCertificateDeleteResponseErrorJSON contains the JSON metadata for the +// struct [AccessCertificateDeleteResponseError] +type accessCertificateDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateDeleteResponseMessageJSON `json:"-"` +} + +// accessCertificateDeleteResponseMessageJSON contains the JSON metadata for the +// struct [AccessCertificateDeleteResponseMessage] +type accessCertificateDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessCertificateDeleteResponseResultJSON `json:"-"` +} + +// accessCertificateDeleteResponseResultJSON contains the JSON metadata for the +// struct [AccessCertificateDeleteResponseResult] +type accessCertificateDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessCertificateDeleteResponseSuccess bool + +const ( + AccessCertificateDeleteResponseSuccessTrue AccessCertificateDeleteResponseSuccess = true +) + +type AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse struct { + Errors []AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseError `json:"errors"` + Messages []AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessage `json:"messages"` + Result AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseSuccess `json:"success"` + JSON accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse] +type accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseErrorJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseError] +type accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessageJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessage] +type accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResult struct { + // The ID of the application that will use this certificate. + ID interface{} `json:"id"` + // The hostnames of the applications that will use this certificate. + AssociatedHostnames []string `json:"associated_hostnames"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // The MD5 fingerprint of the certificate. + Fingerprint string `json:"fingerprint"` + // The name of the certificate. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResultJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResultJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResult] +type accessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResultJSON struct { + ID apijson.Field + AssociatedHostnames apijson.Field + CreatedAt apijson.Field + ExpiresOn apijson.Field + Fingerprint apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseSuccess bool + +const ( + AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseSuccessTrue AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponseSuccess = true +) + +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse struct { + Errors []AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseError `json:"errors"` + Messages []AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessage `json:"messages"` + Result []AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResult `json:"result"` + ResultInfo AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseSuccess `json:"success"` + JSON accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse] +type accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseErrorJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseError] +type accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessageJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessage] +type accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResult struct { + // The ID of the application that will use this certificate. + ID interface{} `json:"id"` + // The hostnames of the applications that will use this certificate. + AssociatedHostnames []string `json:"associated_hostnames"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // The MD5 fingerprint of the certificate. + Fingerprint string `json:"fingerprint"` + // The name of the certificate. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResult] +type accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultJSON struct { + ID apijson.Field + AssociatedHostnames apijson.Field + CreatedAt apijson.Field + ExpiresOn apijson.Field + Fingerprint apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfoJSON `json:"-"` +} + +// accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfo] +type accessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseSuccess bool + +const ( + AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseSuccessTrue AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponseSuccess = true +) + +type AccessCertificateUpdateParams struct { + // The hostnames of the applications that will use this certificate. + AssociatedHostnames param.Field[[]string] `json:"associated_hostnames,required"` + // The name of the certificate. + Name param.Field[string] `json:"name"` +} + +func (r AccessCertificateUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateParams struct { + // The certificate content. + Certificate param.Field[string] `json:"certificate,required"` + // The name of the certificate. + Name param.Field[string] `json:"name,required"` + // The hostnames of the applications that will use this certificate. + AssociatedHostnames param.Field[[]string] `json:"associated_hostnames"` +} + +func (r AccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accesscertificate_test.go b/accesscertificate_test.go new file mode 100644 index 00000000000..a23aa03f08d --- /dev/null +++ b/accesscertificate_test.go @@ -0,0 +1,176 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessCertificateGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Certificates.Get( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessCertificateUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Certificates.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessCertificateUpdateParams{ + AssociatedHostnames: cloudflare.F([]string{"admin.example.com", "admin.example.com", "admin.example.com"}), + Name: cloudflare.F("Allow devs"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessCertificateDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Certificates.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Certificates.AccessMTLSAuthenticationAddAnMTLSCertificate( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateParams{ + Certificate: cloudflare.F("-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----"), + Name: cloudflare.F("Allow devs"), + AssociatedHostnames: cloudflare.F([]string{"admin.example.com", "admin.example.com", "admin.example.com"}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessCertificateAccessMTLSAuthenticationListMTLSCertificates(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Certificates.AccessMTLSAuthenticationListMTLSCertificates( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessgroup.go b/accessgroup.go new file mode 100644 index 00000000000..a425c984d6c --- /dev/null +++ b/accessgroup.go @@ -0,0 +1,15468 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessGroupService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessGroupService] method +// instead. +type AccessGroupService struct { + Options []option.RequestOption +} + +// NewAccessGroupService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessGroupService(opts ...option.RequestOption) (r *AccessGroupService) { + r = &AccessGroupService{} + r.Options = opts + return +} + +// Fetches a single Access group. +func (r *AccessGroupService) Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessGroupGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/groups/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates a configured Access group. +func (r *AccessGroupService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body AccessGroupUpdateParams, opts ...option.RequestOption) (res *AccessGroupUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/groups/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Deletes an Access group. +func (r *AccessGroupService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessGroupDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/groups/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Creates a new Access group. +func (r *AccessGroupService) AccessGroupsNewAnAccessGroup(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessGroupAccessGroupsNewAnAccessGroupParams, opts ...option.RequestOption) (res *AccessGroupAccessGroupsNewAnAccessGroupResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/groups", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists all Access groups. +func (r *AccessGroupService) AccessGroupsListAccessGroups(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessGroupAccessGroupsListAccessGroupsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/groups", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessGroupGetResponse struct { + Errors []AccessGroupGetResponseError `json:"errors"` + Messages []AccessGroupGetResponseMessage `json:"messages"` + Result AccessGroupGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessGroupGetResponseSuccess `json:"success"` + JSON accessGroupGetResponseJSON `json:"-"` +} + +// accessGroupGetResponseJSON contains the JSON metadata for the struct +// [AccessGroupGetResponse] +type accessGroupGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupGetResponseErrorJSON `json:"-"` +} + +// accessGroupGetResponseErrorJSON contains the JSON metadata for the struct +// [AccessGroupGetResponseError] +type accessGroupGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupGetResponseMessageJSON `json:"-"` +} + +// accessGroupGetResponseMessageJSON contains the JSON metadata for the struct +// [AccessGroupGetResponseMessage] +type accessGroupGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupGetResponseResult struct { + // UUID + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessGroupGetResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessGroupGetResponseResultInclude `json:"include"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + IsDefault []AccessGroupGetResponseResultIsDefault `json:"is_default"` + // The name of the Access group. + Name string `json:"name"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require []AccessGroupGetResponseResultRequire `json:"require"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessGroupGetResponseResultJSON `json:"-"` +} + +// accessGroupGetResponseResultJSON contains the JSON metadata for the struct +// [AccessGroupGetResponseResult] +type accessGroupGetResponseResultJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Exclude apijson.Field + Include apijson.Field + IsDefault apijson.Field + Name apijson.Field + Require apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupGetResponseResultExcludeAccessEmailRule], +// [AccessGroupGetResponseResultExcludeAccessEmailListRule], +// [AccessGroupGetResponseResultExcludeAccessDomainRule], +// [AccessGroupGetResponseResultExcludeAccessEveryoneRule], +// [AccessGroupGetResponseResultExcludeAccessIPRule], +// [AccessGroupGetResponseResultExcludeAccessIPListRule], +// [AccessGroupGetResponseResultExcludeAccessCertificateRule], +// [AccessGroupGetResponseResultExcludeAccessAccessGroupRule], +// [AccessGroupGetResponseResultExcludeAccessAzureGroupRule], +// [AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessGroupGetResponseResultExcludeAccessGsuiteGroupRule], +// [AccessGroupGetResponseResultExcludeAccessOktaGroupRule], +// [AccessGroupGetResponseResultExcludeAccessSamlGroupRule], +// [AccessGroupGetResponseResultExcludeAccessServiceTokenRule], +// [AccessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupGetResponseResultExcludeAccessExternalEvaluationRule], +// [AccessGroupGetResponseResultExcludeAccessCountryRule], +// [AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRule] or +// [AccessGroupGetResponseResultExcludeAccessDevicePostureRule]. +type AccessGroupGetResponseResultExclude interface { + implementsAccessGroupGetResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupGetResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupGetResponseResultExcludeAccessEmailRule struct { + Email AccessGroupGetResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupGetResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessEmailRule] +type accessGroupGetResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessEmailRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupGetResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessEmailRuleEmail] +type accessGroupGetResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupGetResponseResultExcludeAccessEmailListRule struct { + EmailList AccessGroupGetResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupGetResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessEmailListRule] +type accessGroupGetResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessEmailListRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessEmailListRuleEmailListJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessEmailListRuleEmailList] +type accessGroupGetResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupGetResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessGroupGetResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupGetResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessDomainRule] +type accessGroupGetResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessDomainRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupGetResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessDomainRuleEmailDomainJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessDomainRuleEmailDomain] +type accessGroupGetResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupGetResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupGetResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessEveryoneRule] +type accessGroupGetResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessEveryoneRule) implementsAccessGroupGetResponseResultExclude() { +} + +// Matches an IP address block. +type AccessGroupGetResponseResultExcludeAccessIPRule struct { + IP AccessGroupGetResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupGetResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessIPRuleJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultExcludeAccessIPRule] +type accessGroupGetResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessIPRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupGetResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessIPRuleIPJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultExcludeAccessIPRuleIP] +type accessGroupGetResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupGetResponseResultExcludeAccessIPListRule struct { + IPList AccessGroupGetResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupGetResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessIPListRule] +type accessGroupGetResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessIPListRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessIPListRuleIPListJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessIPListRuleIPList] +type accessGroupGetResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupGetResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupGetResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessCertificateRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessCertificateRule] +type accessGroupGetResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessCertificateRule) implementsAccessGroupGetResponseResultExclude() { +} + +// Matches an Access group. +type AccessGroupGetResponseResultExcludeAccessAccessGroupRule struct { + Group AccessGroupGetResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupGetResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAccessGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAccessGroupRule] +type accessGroupGetResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessAccessGroupRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAccessGroupRuleGroupJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAccessGroupRuleGroup] +type accessGroupGetResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupGetResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupGetResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAzureGroupRule] +type accessGroupGetResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessAzureGroupRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRule] +type accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupGetResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessGsuiteGroupRule] +type accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessGsuiteGroupRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupGetResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessGroupGetResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupGetResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessOktaGroupRule] +type accessGroupGetResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessOktaGroupRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessOktaGroupRuleOktaJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessOktaGroupRuleOkta] +type accessGroupGetResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupGetResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessGroupGetResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupGetResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessSamlGroupRule] +type accessGroupGetResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessSamlGroupRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupGetResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessSamlGroupRuleSamlJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessSamlGroupRuleSaml] +type accessGroupGetResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupGetResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupGetResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessServiceTokenRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessServiceTokenRule] +type accessGroupGetResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessServiceTokenRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupGetResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupGetResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessExternalEvaluationRule] +type accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessExternalEvaluationRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupGetResponseResultExcludeAccessCountryRule struct { + Geo AccessGroupGetResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupGetResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessCountryRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultExcludeAccessCountryRule] +type accessGroupGetResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessCountryRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupGetResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessCountryRuleGeo] +type accessGroupGetResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRule] +type accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupGetResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupGetResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessDevicePostureRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessDevicePostureRule] +type accessGroupGetResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultExcludeAccessDevicePostureRule) implementsAccessGroupGetResponseResultExclude() { +} + +type AccessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupGetResponseResultIncludeAccessEmailRule], +// [AccessGroupGetResponseResultIncludeAccessEmailListRule], +// [AccessGroupGetResponseResultIncludeAccessDomainRule], +// [AccessGroupGetResponseResultIncludeAccessEveryoneRule], +// [AccessGroupGetResponseResultIncludeAccessIPRule], +// [AccessGroupGetResponseResultIncludeAccessIPListRule], +// [AccessGroupGetResponseResultIncludeAccessCertificateRule], +// [AccessGroupGetResponseResultIncludeAccessAccessGroupRule], +// [AccessGroupGetResponseResultIncludeAccessAzureGroupRule], +// [AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessGroupGetResponseResultIncludeAccessGsuiteGroupRule], +// [AccessGroupGetResponseResultIncludeAccessOktaGroupRule], +// [AccessGroupGetResponseResultIncludeAccessSamlGroupRule], +// [AccessGroupGetResponseResultIncludeAccessServiceTokenRule], +// [AccessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupGetResponseResultIncludeAccessExternalEvaluationRule], +// [AccessGroupGetResponseResultIncludeAccessCountryRule], +// [AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRule] or +// [AccessGroupGetResponseResultIncludeAccessDevicePostureRule]. +type AccessGroupGetResponseResultInclude interface { + implementsAccessGroupGetResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupGetResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupGetResponseResultIncludeAccessEmailRule struct { + Email AccessGroupGetResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupGetResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessEmailRule] +type accessGroupGetResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessEmailRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupGetResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessEmailRuleEmail] +type accessGroupGetResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupGetResponseResultIncludeAccessEmailListRule struct { + EmailList AccessGroupGetResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupGetResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessEmailListRule] +type accessGroupGetResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessEmailListRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessEmailListRuleEmailListJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessEmailListRuleEmailList] +type accessGroupGetResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupGetResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessGroupGetResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupGetResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessDomainRule] +type accessGroupGetResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessDomainRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupGetResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessDomainRuleEmailDomainJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessDomainRuleEmailDomain] +type accessGroupGetResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupGetResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupGetResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessEveryoneRule] +type accessGroupGetResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessEveryoneRule) implementsAccessGroupGetResponseResultInclude() { +} + +// Matches an IP address block. +type AccessGroupGetResponseResultIncludeAccessIPRule struct { + IP AccessGroupGetResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupGetResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessIPRuleJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultIncludeAccessIPRule] +type accessGroupGetResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessIPRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupGetResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessIPRuleIPJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultIncludeAccessIPRuleIP] +type accessGroupGetResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupGetResponseResultIncludeAccessIPListRule struct { + IPList AccessGroupGetResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupGetResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessIPListRule] +type accessGroupGetResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessIPListRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessIPListRuleIPListJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessIPListRuleIPList] +type accessGroupGetResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupGetResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupGetResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessCertificateRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessCertificateRule] +type accessGroupGetResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessCertificateRule) implementsAccessGroupGetResponseResultInclude() { +} + +// Matches an Access group. +type AccessGroupGetResponseResultIncludeAccessAccessGroupRule struct { + Group AccessGroupGetResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupGetResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAccessGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAccessGroupRule] +type accessGroupGetResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessAccessGroupRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAccessGroupRuleGroupJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAccessGroupRuleGroup] +type accessGroupGetResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupGetResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupGetResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAzureGroupRule] +type accessGroupGetResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessAzureGroupRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRule] +type accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupGetResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessGsuiteGroupRule] +type accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessGsuiteGroupRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupGetResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessGroupGetResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupGetResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessOktaGroupRule] +type accessGroupGetResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessOktaGroupRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessOktaGroupRuleOktaJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessOktaGroupRuleOkta] +type accessGroupGetResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupGetResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessGroupGetResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupGetResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessSamlGroupRule] +type accessGroupGetResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessSamlGroupRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupGetResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessSamlGroupRuleSamlJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessSamlGroupRuleSaml] +type accessGroupGetResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupGetResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupGetResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessServiceTokenRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessServiceTokenRule] +type accessGroupGetResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessServiceTokenRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupGetResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupGetResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessExternalEvaluationRule] +type accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessExternalEvaluationRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupGetResponseResultIncludeAccessCountryRule struct { + Geo AccessGroupGetResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupGetResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessCountryRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIncludeAccessCountryRule] +type accessGroupGetResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessCountryRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupGetResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessCountryRuleGeo] +type accessGroupGetResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRule] +type accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupGetResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupGetResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessDevicePostureRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessDevicePostureRule] +type accessGroupGetResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIncludeAccessDevicePostureRule) implementsAccessGroupGetResponseResultInclude() { +} + +type AccessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupGetResponseResultIsDefaultAccessEmailRule], +// [AccessGroupGetResponseResultIsDefaultAccessEmailListRule], +// [AccessGroupGetResponseResultIsDefaultAccessDomainRule], +// [AccessGroupGetResponseResultIsDefaultAccessEveryoneRule], +// [AccessGroupGetResponseResultIsDefaultAccessIPRule], +// [AccessGroupGetResponseResultIsDefaultAccessIPListRule], +// [AccessGroupGetResponseResultIsDefaultAccessCertificateRule], +// [AccessGroupGetResponseResultIsDefaultAccessAccessGroupRule], +// [AccessGroupGetResponseResultIsDefaultAccessAzureGroupRule], +// [AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRule], +// [AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRule], +// [AccessGroupGetResponseResultIsDefaultAccessOktaGroupRule], +// [AccessGroupGetResponseResultIsDefaultAccessSamlGroupRule], +// [AccessGroupGetResponseResultIsDefaultAccessServiceTokenRule], +// [AccessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRule], +// [AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRule], +// [AccessGroupGetResponseResultIsDefaultAccessCountryRule], +// [AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRule] or +// [AccessGroupGetResponseResultIsDefaultAccessDevicePostureRule]. +type AccessGroupGetResponseResultIsDefault interface { + implementsAccessGroupGetResponseResultIsDefault() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupGetResponseResultIsDefault)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupGetResponseResultIsDefaultAccessEmailRule struct { + Email AccessGroupGetResponseResultIsDefaultAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupGetResponseResultIsDefaultAccessEmailRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIsDefaultAccessEmailRule] +type accessGroupGetResponseResultIsDefaultAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessEmailRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupGetResponseResultIsDefaultAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessEmailRuleEmail] +type accessGroupGetResponseResultIsDefaultAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupGetResponseResultIsDefaultAccessEmailListRule struct { + EmailList AccessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupGetResponseResultIsDefaultAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessEmailListRule] +type accessGroupGetResponseResultIsDefaultAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessEmailListRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailList] +type accessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupGetResponseResultIsDefaultAccessDomainRule struct { + EmailDomain AccessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupGetResponseResultIsDefaultAccessDomainRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIsDefaultAccessDomainRule] +type accessGroupGetResponseResultIsDefaultAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessDomainRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomain] +type accessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupGetResponseResultIsDefaultAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupGetResponseResultIsDefaultAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessEveryoneRule] +type accessGroupGetResponseResultIsDefaultAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessEveryoneRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +// Matches an IP address block. +type AccessGroupGetResponseResultIsDefaultAccessIPRule struct { + IP AccessGroupGetResponseResultIsDefaultAccessIPRuleIP `json:"ip,required"` + JSON accessGroupGetResponseResultIsDefaultAccessIPRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessIPRuleJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultIsDefaultAccessIPRule] +type accessGroupGetResponseResultIsDefaultAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessIPRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupGetResponseResultIsDefaultAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIsDefaultAccessIPRuleIP] +type accessGroupGetResponseResultIsDefaultAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupGetResponseResultIsDefaultAccessIPListRule struct { + IPList AccessGroupGetResponseResultIsDefaultAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupGetResponseResultIsDefaultAccessIPListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIsDefaultAccessIPListRule] +type accessGroupGetResponseResultIsDefaultAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessIPListRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIsDefaultAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessIPListRuleIPList] +type accessGroupGetResponseResultIsDefaultAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupGetResponseResultIsDefaultAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupGetResponseResultIsDefaultAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessCertificateRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessCertificateRule] +type accessGroupGetResponseResultIsDefaultAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessCertificateRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +// Matches an Access group. +type AccessGroupGetResponseResultIsDefaultAccessAccessGroupRule struct { + Group AccessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAccessGroupRule] +type accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessAccessGroupRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroupJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroup] +type accessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupGetResponseResultIsDefaultAccessAzureGroupRule struct { + AzureAd AccessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAzureGroupRule] +type accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessAzureGroupRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAd] +type accessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRule] +type accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRule struct { + Gsuite AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRule] +type accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuite] +type accessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupGetResponseResultIsDefaultAccessOktaGroupRule struct { + Okta AccessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessOktaGroupRule] +type accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessOktaGroupRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOkta] +type accessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupGetResponseResultIsDefaultAccessSamlGroupRule struct { + Saml AccessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessSamlGroupRule] +type accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessSamlGroupRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSaml] +type accessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupGetResponseResultIsDefaultAccessServiceTokenRule struct { + ServiceToken AccessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessServiceTokenRule] +type accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessServiceTokenRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceToken] +type accessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRule] +type accessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessAnyValidServiceTokenRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRule] +type accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupGetResponseResultIsDefaultAccessCountryRule struct { + Geo AccessGroupGetResponseResultIsDefaultAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupGetResponseResultIsDefaultAccessCountryRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessCountryRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultIsDefaultAccessCountryRule] +type accessGroupGetResponseResultIsDefaultAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessCountryRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupGetResponseResultIsDefaultAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessCountryRuleGeo] +type accessGroupGetResponseResultIsDefaultAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRule] +type accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod] +type accessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupGetResponseResultIsDefaultAccessDevicePostureRule struct { + DevicePosture AccessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessDevicePostureRule] +type accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultIsDefaultAccessDevicePostureRule) implementsAccessGroupGetResponseResultIsDefault() { +} + +type AccessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePosture] +type accessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultIsDefaultAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupGetResponseResultRequireAccessEmailRule], +// [AccessGroupGetResponseResultRequireAccessEmailListRule], +// [AccessGroupGetResponseResultRequireAccessDomainRule], +// [AccessGroupGetResponseResultRequireAccessEveryoneRule], +// [AccessGroupGetResponseResultRequireAccessIPRule], +// [AccessGroupGetResponseResultRequireAccessIPListRule], +// [AccessGroupGetResponseResultRequireAccessCertificateRule], +// [AccessGroupGetResponseResultRequireAccessAccessGroupRule], +// [AccessGroupGetResponseResultRequireAccessAzureGroupRule], +// [AccessGroupGetResponseResultRequireAccessGitHubOrganizationRule], +// [AccessGroupGetResponseResultRequireAccessGsuiteGroupRule], +// [AccessGroupGetResponseResultRequireAccessOktaGroupRule], +// [AccessGroupGetResponseResultRequireAccessSamlGroupRule], +// [AccessGroupGetResponseResultRequireAccessServiceTokenRule], +// [AccessGroupGetResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessGroupGetResponseResultRequireAccessExternalEvaluationRule], +// [AccessGroupGetResponseResultRequireAccessCountryRule], +// [AccessGroupGetResponseResultRequireAccessAuthenticationMethodRule] or +// [AccessGroupGetResponseResultRequireAccessDevicePostureRule]. +type AccessGroupGetResponseResultRequire interface { + implementsAccessGroupGetResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupGetResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupGetResponseResultRequireAccessEmailRule struct { + Email AccessGroupGetResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupGetResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessEmailRule] +type accessGroupGetResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessEmailRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupGetResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessEmailRuleEmail] +type accessGroupGetResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupGetResponseResultRequireAccessEmailListRule struct { + EmailList AccessGroupGetResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupGetResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessEmailListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessEmailListRule] +type accessGroupGetResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessEmailListRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessEmailListRuleEmailListJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessEmailListRuleEmailList] +type accessGroupGetResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupGetResponseResultRequireAccessDomainRule struct { + EmailDomain AccessGroupGetResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupGetResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessDomainRule] +type accessGroupGetResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessDomainRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupGetResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessDomainRuleEmailDomainJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessDomainRuleEmailDomain] +type accessGroupGetResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupGetResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupGetResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessEveryoneRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessEveryoneRule] +type accessGroupGetResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessEveryoneRule) implementsAccessGroupGetResponseResultRequire() { +} + +// Matches an IP address block. +type AccessGroupGetResponseResultRequireAccessIPRule struct { + IP AccessGroupGetResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessGroupGetResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessIPRuleJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultRequireAccessIPRule] +type accessGroupGetResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessIPRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupGetResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessIPRuleIPJSON contains the JSON metadata +// for the struct [AccessGroupGetResponseResultRequireAccessIPRuleIP] +type accessGroupGetResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupGetResponseResultRequireAccessIPListRule struct { + IPList AccessGroupGetResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupGetResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessIPListRule] +type accessGroupGetResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessIPListRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessIPListRuleIPListJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessIPListRuleIPList] +type accessGroupGetResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupGetResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupGetResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessCertificateRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessCertificateRule] +type accessGroupGetResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessCertificateRule) implementsAccessGroupGetResponseResultRequire() { +} + +// Matches an Access group. +type AccessGroupGetResponseResultRequireAccessAccessGroupRule struct { + Group AccessGroupGetResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupGetResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAccessGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAccessGroupRule] +type accessGroupGetResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessAccessGroupRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupGetResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAccessGroupRuleGroupJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAccessGroupRuleGroup] +type accessGroupGetResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupGetResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupGetResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAzureGroupRule] +type accessGroupGetResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessAzureGroupRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupGetResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessGitHubOrganizationRule] +type accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessGitHubOrganizationRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupGetResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupGetResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessGsuiteGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessGsuiteGroupRule] +type accessGroupGetResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessGsuiteGroupRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupGetResponseResultRequireAccessOktaGroupRule struct { + Okta AccessGroupGetResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupGetResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessOktaGroupRule] +type accessGroupGetResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessOktaGroupRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupGetResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessOktaGroupRuleOktaJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessOktaGroupRuleOkta] +type accessGroupGetResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupGetResponseResultRequireAccessSamlGroupRule struct { + Saml AccessGroupGetResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupGetResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessSamlGroupRule] +type accessGroupGetResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessSamlGroupRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupGetResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessSamlGroupRuleSamlJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessSamlGroupRuleSaml] +type accessGroupGetResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupGetResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessGroupGetResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupGetResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessServiceTokenRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessServiceTokenRule] +type accessGroupGetResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessServiceTokenRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessGroupGetResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupGetResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAnyValidServiceTokenRule] +type accessGroupGetResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessGroupGetResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupGetResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupGetResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessExternalEvaluationRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessExternalEvaluationRule] +type accessGroupGetResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessExternalEvaluationRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupGetResponseResultRequireAccessCountryRule struct { + Geo AccessGroupGetResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupGetResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessCountryRuleJSON contains the JSON +// metadata for the struct [AccessGroupGetResponseResultRequireAccessCountryRule] +type accessGroupGetResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessCountryRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupGetResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessCountryRuleGeo] +type accessGroupGetResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupGetResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAuthenticationMethodRule] +type accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessAuthenticationMethodRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupGetResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupGetResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessDevicePostureRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupGetResponseResultRequireAccessDevicePostureRule] +type accessGroupGetResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupGetResponseResultRequireAccessDevicePostureRule) implementsAccessGroupGetResponseResultRequire() { +} + +type AccessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupGetResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessGroupGetResponseSuccess bool + +const ( + AccessGroupGetResponseSuccessTrue AccessGroupGetResponseSuccess = true +) + +type AccessGroupUpdateResponse struct { + Errors []AccessGroupUpdateResponseError `json:"errors"` + Messages []AccessGroupUpdateResponseMessage `json:"messages"` + Result AccessGroupUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessGroupUpdateResponseSuccess `json:"success"` + JSON accessGroupUpdateResponseJSON `json:"-"` +} + +// accessGroupUpdateResponseJSON contains the JSON metadata for the struct +// [AccessGroupUpdateResponse] +type accessGroupUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupUpdateResponseErrorJSON `json:"-"` +} + +// accessGroupUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccessGroupUpdateResponseError] +type accessGroupUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupUpdateResponseMessageJSON `json:"-"` +} + +// accessGroupUpdateResponseMessageJSON contains the JSON metadata for the struct +// [AccessGroupUpdateResponseMessage] +type accessGroupUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupUpdateResponseResult struct { + // UUID + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessGroupUpdateResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessGroupUpdateResponseResultInclude `json:"include"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + IsDefault []AccessGroupUpdateResponseResultIsDefault `json:"is_default"` + // The name of the Access group. + Name string `json:"name"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require []AccessGroupUpdateResponseResultRequire `json:"require"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessGroupUpdateResponseResultJSON `json:"-"` +} + +// accessGroupUpdateResponseResultJSON contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResult] +type accessGroupUpdateResponseResultJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Exclude apijson.Field + Include apijson.Field + IsDefault apijson.Field + Name apijson.Field + Require apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupUpdateResponseResultExcludeAccessEmailRule], +// [AccessGroupUpdateResponseResultExcludeAccessEmailListRule], +// [AccessGroupUpdateResponseResultExcludeAccessDomainRule], +// [AccessGroupUpdateResponseResultExcludeAccessEveryoneRule], +// [AccessGroupUpdateResponseResultExcludeAccessIPRule], +// [AccessGroupUpdateResponseResultExcludeAccessIPListRule], +// [AccessGroupUpdateResponseResultExcludeAccessCertificateRule], +// [AccessGroupUpdateResponseResultExcludeAccessAccessGroupRule], +// [AccessGroupUpdateResponseResultExcludeAccessAzureGroupRule], +// [AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRule], +// [AccessGroupUpdateResponseResultExcludeAccessOktaGroupRule], +// [AccessGroupUpdateResponseResultExcludeAccessSamlGroupRule], +// [AccessGroupUpdateResponseResultExcludeAccessServiceTokenRule], +// [AccessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRule], +// [AccessGroupUpdateResponseResultExcludeAccessCountryRule], +// [AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRule] or +// [AccessGroupUpdateResponseResultExcludeAccessDevicePostureRule]. +type AccessGroupUpdateResponseResultExclude interface { + implementsAccessGroupUpdateResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupUpdateResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupUpdateResponseResultExcludeAccessEmailRule struct { + Email AccessGroupUpdateResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupUpdateResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultExcludeAccessEmailRule] +type accessGroupUpdateResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessEmailRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupUpdateResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessEmailRuleEmail] +type accessGroupUpdateResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupUpdateResponseResultExcludeAccessEmailListRule struct { + EmailList AccessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupUpdateResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessEmailListRule] +type accessGroupUpdateResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessEmailListRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailList] +type accessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupUpdateResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupUpdateResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultExcludeAccessDomainRule] +type accessGroupUpdateResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessDomainRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomain] +type accessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupUpdateResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupUpdateResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessEveryoneRule] +type accessGroupUpdateResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessEveryoneRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +// Matches an IP address block. +type AccessGroupUpdateResponseResultExcludeAccessIPRule struct { + IP AccessGroupUpdateResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupUpdateResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultExcludeAccessIPRule] +type accessGroupUpdateResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessIPRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupUpdateResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultExcludeAccessIPRuleIP] +type accessGroupUpdateResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateResponseResultExcludeAccessIPListRule struct { + IPList AccessGroupUpdateResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupUpdateResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultExcludeAccessIPListRule] +type accessGroupUpdateResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessIPListRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessIPListRuleIPList] +type accessGroupUpdateResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupUpdateResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessCertificateRule] +type accessGroupUpdateResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessCertificateRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +// Matches an Access group. +type AccessGroupUpdateResponseResultExcludeAccessAccessGroupRule struct { + Group AccessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAccessGroupRule] +type accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessAccessGroupRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroup] +type accessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAzureGroupRule] +type accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessAzureGroupRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRule] +type accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRule] +type accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessOktaGroupRule] +type accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessOktaGroupRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOkta] +type accessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessSamlGroupRule] +type accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessSamlGroupRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSaml] +type accessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessServiceTokenRule] +type accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessServiceTokenRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRule] +type accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupUpdateResponseResultExcludeAccessCountryRule struct { + Geo AccessGroupUpdateResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupUpdateResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessCountryRule] +type accessGroupUpdateResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessCountryRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupUpdateResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessCountryRuleGeo] +type accessGroupUpdateResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRule] +type accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessDevicePostureRule] +type accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultExcludeAccessDevicePostureRule) implementsAccessGroupUpdateResponseResultExclude() { +} + +type AccessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupUpdateResponseResultIncludeAccessEmailRule], +// [AccessGroupUpdateResponseResultIncludeAccessEmailListRule], +// [AccessGroupUpdateResponseResultIncludeAccessDomainRule], +// [AccessGroupUpdateResponseResultIncludeAccessEveryoneRule], +// [AccessGroupUpdateResponseResultIncludeAccessIPRule], +// [AccessGroupUpdateResponseResultIncludeAccessIPListRule], +// [AccessGroupUpdateResponseResultIncludeAccessCertificateRule], +// [AccessGroupUpdateResponseResultIncludeAccessAccessGroupRule], +// [AccessGroupUpdateResponseResultIncludeAccessAzureGroupRule], +// [AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRule], +// [AccessGroupUpdateResponseResultIncludeAccessOktaGroupRule], +// [AccessGroupUpdateResponseResultIncludeAccessSamlGroupRule], +// [AccessGroupUpdateResponseResultIncludeAccessServiceTokenRule], +// [AccessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRule], +// [AccessGroupUpdateResponseResultIncludeAccessCountryRule], +// [AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRule] or +// [AccessGroupUpdateResponseResultIncludeAccessDevicePostureRule]. +type AccessGroupUpdateResponseResultInclude interface { + implementsAccessGroupUpdateResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupUpdateResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupUpdateResponseResultIncludeAccessEmailRule struct { + Email AccessGroupUpdateResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupUpdateResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIncludeAccessEmailRule] +type accessGroupUpdateResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessEmailRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupUpdateResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessEmailRuleEmail] +type accessGroupUpdateResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupUpdateResponseResultIncludeAccessEmailListRule struct { + EmailList AccessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupUpdateResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessEmailListRule] +type accessGroupUpdateResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessEmailListRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailList] +type accessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupUpdateResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupUpdateResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIncludeAccessDomainRule] +type accessGroupUpdateResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessDomainRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomain] +type accessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupUpdateResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupUpdateResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessEveryoneRule] +type accessGroupUpdateResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessEveryoneRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +// Matches an IP address block. +type AccessGroupUpdateResponseResultIncludeAccessIPRule struct { + IP AccessGroupUpdateResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupUpdateResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIncludeAccessIPRule] +type accessGroupUpdateResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessIPRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupUpdateResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIncludeAccessIPRuleIP] +type accessGroupUpdateResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateResponseResultIncludeAccessIPListRule struct { + IPList AccessGroupUpdateResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupUpdateResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIncludeAccessIPListRule] +type accessGroupUpdateResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessIPListRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessIPListRuleIPList] +type accessGroupUpdateResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupUpdateResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessCertificateRule] +type accessGroupUpdateResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessCertificateRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +// Matches an Access group. +type AccessGroupUpdateResponseResultIncludeAccessAccessGroupRule struct { + Group AccessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAccessGroupRule] +type accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessAccessGroupRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroup] +type accessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAzureGroupRule] +type accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessAzureGroupRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRule] +type accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRule] +type accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessOktaGroupRule] +type accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessOktaGroupRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOkta] +type accessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessSamlGroupRule] +type accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessSamlGroupRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSaml] +type accessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessServiceTokenRule] +type accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessServiceTokenRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRule] +type accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupUpdateResponseResultIncludeAccessCountryRule struct { + Geo AccessGroupUpdateResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupUpdateResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessCountryRule] +type accessGroupUpdateResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessCountryRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupUpdateResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessCountryRuleGeo] +type accessGroupUpdateResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRule] +type accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessDevicePostureRule] +type accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIncludeAccessDevicePostureRule) implementsAccessGroupUpdateResponseResultInclude() { +} + +type AccessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupUpdateResponseResultIsDefaultAccessEmailRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessEmailListRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessDomainRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessEveryoneRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessIPRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessIPListRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessCertificateRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessCountryRule], +// [AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRule] or +// [AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRule]. +type AccessGroupUpdateResponseResultIsDefault interface { + implementsAccessGroupUpdateResponseResultIsDefault() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupUpdateResponseResultIsDefault)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupUpdateResponseResultIsDefaultAccessEmailRule struct { + Email AccessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessEmailRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessEmailRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessEmailRule] +type accessGroupUpdateResponseResultIsDefaultAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessEmailRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmailJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmail] +type accessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupUpdateResponseResultIsDefaultAccessEmailListRule struct { + EmailList AccessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessEmailListRule] +type accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessEmailListRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailList] +type accessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupUpdateResponseResultIsDefaultAccessDomainRule struct { + EmailDomain AccessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessDomainRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessDomainRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessDomainRule] +type accessGroupUpdateResponseResultIsDefaultAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessDomainRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomain] +type accessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupUpdateResponseResultIsDefaultAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessEveryoneRule] +type accessGroupUpdateResponseResultIsDefaultAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessEveryoneRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +// Matches an IP address block. +type AccessGroupUpdateResponseResultIsDefaultAccessIPRule struct { + IP AccessGroupUpdateResponseResultIsDefaultAccessIPRuleIP `json:"ip,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessIPRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIsDefaultAccessIPRule] +type accessGroupUpdateResponseResultIsDefaultAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessIPRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultIsDefaultAccessIPRuleIP] +type accessGroupUpdateResponseResultIsDefaultAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateResponseResultIsDefaultAccessIPListRule struct { + IPList AccessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessIPListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessIPListRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessIPListRule] +type accessGroupUpdateResponseResultIsDefaultAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessIPListRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPList] +type accessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateResponseResultIsDefaultAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessCertificateRule] +type accessGroupUpdateResponseResultIsDefaultAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessCertificateRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +// Matches an Access group. +type AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRule struct { + Group AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRule] +type accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroup] +type accessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRule struct { + AzureAd AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRule] +type accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAd] +type accessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRule] +type accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRule struct { + Gsuite AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRule] +type accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuite] +type accessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRule struct { + Okta AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRule] +type accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOkta] +type accessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRule struct { + Saml AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRule] +type accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSaml] +type accessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRule struct { + ServiceToken AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRule] +type accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceToken] +type accessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRule] +type accessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRule] +type accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupUpdateResponseResultIsDefaultAccessCountryRule struct { + Geo AccessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessCountryRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessCountryRule] +type accessGroupUpdateResponseResultIsDefaultAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessCountryRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeoJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeo] +type accessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRule] +type accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod] +type accessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRule struct { + DevicePosture AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRule] +type accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRule) implementsAccessGroupUpdateResponseResultIsDefault() { +} + +type AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePosture] +type accessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultIsDefaultAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by [AccessGroupUpdateResponseResultRequireAccessEmailRule], +// [AccessGroupUpdateResponseResultRequireAccessEmailListRule], +// [AccessGroupUpdateResponseResultRequireAccessDomainRule], +// [AccessGroupUpdateResponseResultRequireAccessEveryoneRule], +// [AccessGroupUpdateResponseResultRequireAccessIPRule], +// [AccessGroupUpdateResponseResultRequireAccessIPListRule], +// [AccessGroupUpdateResponseResultRequireAccessCertificateRule], +// [AccessGroupUpdateResponseResultRequireAccessAccessGroupRule], +// [AccessGroupUpdateResponseResultRequireAccessAzureGroupRule], +// [AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRule], +// [AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRule], +// [AccessGroupUpdateResponseResultRequireAccessOktaGroupRule], +// [AccessGroupUpdateResponseResultRequireAccessSamlGroupRule], +// [AccessGroupUpdateResponseResultRequireAccessServiceTokenRule], +// [AccessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRule], +// [AccessGroupUpdateResponseResultRequireAccessCountryRule], +// [AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRule] or +// [AccessGroupUpdateResponseResultRequireAccessDevicePostureRule]. +type AccessGroupUpdateResponseResultRequire interface { + implementsAccessGroupUpdateResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupUpdateResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupUpdateResponseResultRequireAccessEmailRule struct { + Email AccessGroupUpdateResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupUpdateResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessEmailRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultRequireAccessEmailRule] +type accessGroupUpdateResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessEmailRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupUpdateResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessEmailRuleEmailJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessEmailRuleEmail] +type accessGroupUpdateResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupUpdateResponseResultRequireAccessEmailListRule struct { + EmailList AccessGroupUpdateResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupUpdateResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessEmailListRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessEmailListRule] +type accessGroupUpdateResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessEmailListRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessEmailListRuleEmailListJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessEmailListRuleEmailList] +type accessGroupUpdateResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupUpdateResponseResultRequireAccessDomainRule struct { + EmailDomain AccessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupUpdateResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessDomainRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultRequireAccessDomainRule] +type accessGroupUpdateResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessDomainRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomain] +type accessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupUpdateResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupUpdateResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessEveryoneRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessEveryoneRule] +type accessGroupUpdateResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessEveryoneRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +// Matches an IP address block. +type AccessGroupUpdateResponseResultRequireAccessIPRule struct { + IP AccessGroupUpdateResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessGroupUpdateResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessIPRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultRequireAccessIPRule] +type accessGroupUpdateResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessIPRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupUpdateResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessIPRuleIPJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultRequireAccessIPRuleIP] +type accessGroupUpdateResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateResponseResultRequireAccessIPListRule struct { + IPList AccessGroupUpdateResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupUpdateResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessIPListRuleJSON contains the JSON +// metadata for the struct [AccessGroupUpdateResponseResultRequireAccessIPListRule] +type accessGroupUpdateResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessIPListRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessIPListRuleIPListJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessIPListRuleIPList] +type accessGroupUpdateResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupUpdateResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessCertificateRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessCertificateRule] +type accessGroupUpdateResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessCertificateRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +// Matches an Access group. +type AccessGroupUpdateResponseResultRequireAccessAccessGroupRule struct { + Group AccessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupUpdateResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAccessGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAccessGroupRule] +type accessGroupUpdateResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessAccessGroupRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroup] +type accessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupUpdateResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAzureGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAzureGroupRule] +type accessGroupUpdateResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessAzureGroupRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRule] +type accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRule] +type accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateResponseResultRequireAccessOktaGroupRule struct { + Okta AccessGroupUpdateResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupUpdateResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessOktaGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessOktaGroupRule] +type accessGroupUpdateResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessOktaGroupRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessOktaGroupRuleOkta] +type accessGroupUpdateResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateResponseResultRequireAccessSamlGroupRule struct { + Saml AccessGroupUpdateResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupUpdateResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessSamlGroupRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessSamlGroupRule] +type accessGroupUpdateResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessSamlGroupRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessSamlGroupRuleSaml] +type accessGroupUpdateResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupUpdateResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessServiceTokenRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessServiceTokenRule] +type accessGroupUpdateResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessServiceTokenRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRule] +type accessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleJSON contains +// the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRule] +type accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupUpdateResponseResultRequireAccessCountryRule struct { + Geo AccessGroupUpdateResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupUpdateResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessCountryRuleJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessCountryRule] +type accessGroupUpdateResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessCountryRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupUpdateResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessCountryRuleGeoJSON contains the JSON +// metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessCountryRuleGeo] +type accessGroupUpdateResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRule] +type accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupUpdateResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessDevicePostureRuleJSON contains the +// JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessDevicePostureRule] +type accessGroupUpdateResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupUpdateResponseResultRequireAccessDevicePostureRule) implementsAccessGroupUpdateResponseResultRequire() { +} + +type AccessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupUpdateResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessGroupUpdateResponseSuccess bool + +const ( + AccessGroupUpdateResponseSuccessTrue AccessGroupUpdateResponseSuccess = true +) + +type AccessGroupDeleteResponse struct { + Errors []AccessGroupDeleteResponseError `json:"errors"` + Messages []AccessGroupDeleteResponseMessage `json:"messages"` + Result AccessGroupDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessGroupDeleteResponseSuccess `json:"success"` + JSON accessGroupDeleteResponseJSON `json:"-"` +} + +// accessGroupDeleteResponseJSON contains the JSON metadata for the struct +// [AccessGroupDeleteResponse] +type accessGroupDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupDeleteResponseErrorJSON `json:"-"` +} + +// accessGroupDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccessGroupDeleteResponseError] +type accessGroupDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupDeleteResponseMessageJSON `json:"-"` +} + +// accessGroupDeleteResponseMessageJSON contains the JSON metadata for the struct +// [AccessGroupDeleteResponseMessage] +type accessGroupDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessGroupDeleteResponseResultJSON `json:"-"` +} + +// accessGroupDeleteResponseResultJSON contains the JSON metadata for the struct +// [AccessGroupDeleteResponseResult] +type accessGroupDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessGroupDeleteResponseSuccess bool + +const ( + AccessGroupDeleteResponseSuccessTrue AccessGroupDeleteResponseSuccess = true +) + +type AccessGroupAccessGroupsNewAnAccessGroupResponse struct { + Errors []AccessGroupAccessGroupsNewAnAccessGroupResponseError `json:"errors"` + Messages []AccessGroupAccessGroupsNewAnAccessGroupResponseMessage `json:"messages"` + Result AccessGroupAccessGroupsNewAnAccessGroupResponseResult `json:"result"` + // Whether the API call was successful + Success AccessGroupAccessGroupsNewAnAccessGroupResponseSuccess `json:"success"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseJSON contains the JSON metadata +// for the struct [AccessGroupAccessGroupsNewAnAccessGroupResponse] +type accessGroupAccessGroupsNewAnAccessGroupResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseErrorJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseErrorJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsNewAnAccessGroupResponseError] +type accessGroupAccessGroupsNewAnAccessGroupResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseMessageJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseMessageJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsNewAnAccessGroupResponseMessage] +type accessGroupAccessGroupsNewAnAccessGroupResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResult struct { + // UUID + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude `json:"include"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + IsDefault []AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault `json:"is_default"` + // The name of the Access group. + Name string `json:"name"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require []AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire `json:"require"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsNewAnAccessGroupResponseResult] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Exclude apijson.Field + Include apijson.Field + IsDefault apijson.Field + Name apijson.Field + Require apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRule struct { + Email AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmail] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRule struct { + IP AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIP] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRule struct { + IPList AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRule struct { + Geo AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeo] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRule struct { + Email AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmail] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRule struct { + IP AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIP] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRule struct { + IPList AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRule struct { + Geo AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeo] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRule struct { + Email AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmail] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRule struct { + IP AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIP] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRule struct { + IPList AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRule struct { + Geo AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeo] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultIsDefaultAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRule struct { + Email AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmail] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRule struct { + IP AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIP] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRule struct { + IPList AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPList] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRule struct { + Geo AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeo] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRule] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupResponseResultRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsNewAnAccessGroupResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessGroupAccessGroupsNewAnAccessGroupResponseSuccess bool + +const ( + AccessGroupAccessGroupsNewAnAccessGroupResponseSuccessTrue AccessGroupAccessGroupsNewAnAccessGroupResponseSuccess = true +) + +type AccessGroupAccessGroupsListAccessGroupsResponse struct { + Errors []AccessGroupAccessGroupsListAccessGroupsResponseError `json:"errors"` + Messages []AccessGroupAccessGroupsListAccessGroupsResponseMessage `json:"messages"` + Result []AccessGroupAccessGroupsListAccessGroupsResponseResult `json:"result"` + ResultInfo AccessGroupAccessGroupsListAccessGroupsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessGroupAccessGroupsListAccessGroupsResponseSuccess `json:"success"` + JSON accessGroupAccessGroupsListAccessGroupsResponseJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseJSON contains the JSON metadata +// for the struct [AccessGroupAccessGroupsListAccessGroupsResponse] +type accessGroupAccessGroupsListAccessGroupsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsListAccessGroupsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseErrorJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseErrorJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsListAccessGroupsResponseError] +type accessGroupAccessGroupsListAccessGroupsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsListAccessGroupsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseMessageJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseMessageJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsListAccessGroupsResponseMessage] +type accessGroupAccessGroupsListAccessGroupsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResult struct { + // UUID + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude []AccessGroupAccessGroupsListAccessGroupsResponseResultExclude `json:"exclude"` + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include []AccessGroupAccessGroupsListAccessGroupsResponseResultInclude `json:"include"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + IsDefault []AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault `json:"is_default"` + // The name of the Access group. + Name string `json:"name"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require []AccessGroupAccessGroupsListAccessGroupsResponseResultRequire `json:"require"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultJSON contains the JSON +// metadata for the struct [AccessGroupAccessGroupsListAccessGroupsResponseResult] +type accessGroupAccessGroupsListAccessGroupsResponseResultJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Exclude apijson.Field + Include apijson.Field + IsDefault apijson.Field + Name apijson.Field + Require apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExclude interface { + implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsListAccessGroupsResponseResultExclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRule struct { + Email AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmail] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailList] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessEveryoneRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRule struct { + IP AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIP] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRule struct { + IPList AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPList] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCertificateRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRule struct { + Geo AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeo] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultExclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultExcludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsListAccessGroupsResponseResultInclude interface { + implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsListAccessGroupsResponseResultInclude)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRule struct { + Email AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmail] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailList] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessEveryoneRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRule struct { + IP AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIP] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRule struct { + IPList AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPList] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCertificateRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRule struct { + Geo AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeo] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultInclude() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIncludeAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRule]. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault interface { + implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRule struct { + Email AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmail] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailList] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessEveryoneRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRule struct { + IP AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIP] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRule struct { + IPList AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPList] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCertificateRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRule struct { + Geo AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeo] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultIsDefault() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultIsDefaultAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific email. +// +// Union satisfied by +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRule], +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRule] +// or +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRule]. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequire interface { + implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessGroupAccessGroupsListAccessGroupsResponseResultRequire)(nil)).Elem(), "") +} + +// Matches a specific email. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRule struct { + Email AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmail `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmail struct { + // The email of the user. + Email string `json:"email,required" format:"email"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmailJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmailJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmail] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmailJSON struct { + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailRuleEmail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRule struct { + EmailList AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailList `json:"email_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleJSON struct { + EmailList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailList] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEmailListRuleEmailList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRule struct { + EmailDomain AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomain `json:"email_domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleJSON struct { + EmailDomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain string `json:"domain,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomainJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomainJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomain] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomainJSON struct { + Domain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDomainRuleEmailDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches everyone. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone interface{} `json:"everyone,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRuleJSON struct { + Everyone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessEveryoneRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRule struct { + IP AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIP `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP string `json:"ip,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIPJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIPJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIP] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIPJSON struct { + IP apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPRuleIP) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRule struct { + IPList AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPList `json:"ip_list,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleJSON struct { + IPList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPListJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPListJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPList] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPListJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessIPListRuleIPList) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRule struct { + Certificate interface{} `json:"certificate,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRuleJSON struct { + Certificate apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCertificateRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRule struct { + Group AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroup `json:"group,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleJSON struct { + Group apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID string `json:"id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroupJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroupJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroup] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroupJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAccessGroupRuleGroup) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRule struct { + AzureAd AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAd `json:"azureAD,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleJSON struct { + AzureAd apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID string `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID string `json:"connection_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAdJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAdJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAd] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAdJSON struct { + ID apijson.Field + ConnectionID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAzureGroupRuleAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRule struct { + GitHubOrganization AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization `json:"github-organization,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleJSON struct { + GitHubOrganization apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID string `json:"connection_id,required"` + // The name of the organization. + Name string `json:"name,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganizationJSON struct { + ConnectionID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGitHubOrganizationRuleGitHubOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRule struct { + Gsuite AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuite `json:"gsuite,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleJSON struct { + Gsuite apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Google Workspace group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuite] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuiteJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessGsuiteGroupRuleGsuite) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRule struct { + Okta AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOkta `json:"okta,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleJSON struct { + Okta apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID string `json:"connection_id,required"` + // The email of the Okta group. + Email string `json:"email,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOktaJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOktaJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOkta] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOktaJSON struct { + ConnectionID apijson.Field + Email apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessOktaGroupRuleOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRule struct { + Saml AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSaml `json:"saml,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleJSON struct { + Saml apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName string `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue string `json:"attribute_value,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSamlJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSamlJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSaml] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSamlJSON struct { + AttributeName apijson.Field + AttributeValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessSamlGroupRuleSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRule struct { + ServiceToken AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceToken `json:"service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleJSON struct { + ServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID string `json:"token_id,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceTokenJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceTokenJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceToken] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceTokenJSON struct { + TokenID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessServiceTokenRuleServiceToken) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken interface{} `json:"any_valid_service_token,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRuleJSON struct { + AnyValidServiceToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRule struct { + ExternalEvaluation AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation `json:"external_evaluation,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleJSON struct { + ExternalEvaluation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL string `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL string `json:"keys_url,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluationJSON struct { + EvaluateURL apijson.Field + KeysURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessExternalEvaluationRuleExternalEvaluation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Matches a specific country +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRule struct { + Geo AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeo `json:"geo,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleJSON struct { + Geo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode string `json:"country_code,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeoJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeoJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeo] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeoJSON struct { + CountryCode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessCountryRuleGeo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRule struct { + AuthMethod AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethod `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod string `json:"auth_method,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethod] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethodJSON struct { + AuthMethod apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessAuthenticationMethodRuleAuthMethod) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRule struct { + DevicePosture AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePosture `json:"device_posture,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRule] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleJSON struct { + DevicePosture apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRule) implementsAccessGroupAccessGroupsListAccessGroupsResponseResultRequire() { +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid string `json:"integration_uid,required"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePostureJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePostureJSON +// contains the JSON metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePosture] +type accessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePostureJSON struct { + IntegrationUid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultRequireAccessDevicePostureRuleDevicePosture) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessGroupAccessGroupsListAccessGroupsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessGroupAccessGroupsListAccessGroupsResponseResultInfoJSON `json:"-"` +} + +// accessGroupAccessGroupsListAccessGroupsResponseResultInfoJSON contains the JSON +// metadata for the struct +// [AccessGroupAccessGroupsListAccessGroupsResponseResultInfo] +type accessGroupAccessGroupsListAccessGroupsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessGroupAccessGroupsListAccessGroupsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessGroupAccessGroupsListAccessGroupsResponseSuccess bool + +const ( + AccessGroupAccessGroupsListAccessGroupsResponseSuccessTrue AccessGroupAccessGroupsListAccessGroupsResponseSuccess = true +) + +type AccessGroupUpdateParams struct { + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include param.Field[[]AccessGroupUpdateParamsInclude] `json:"include,required"` + // The name of the Access group. + Name param.Field[string] `json:"name,required"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude param.Field[[]AccessGroupUpdateParamsExclude] `json:"exclude"` + // Whether this is the default group + IsDefault param.Field[bool] `json:"is_default"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require param.Field[[]AccessGroupUpdateParamsRequire] `json:"require"` +} + +func (r AccessGroupUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by [AccessGroupUpdateParamsIncludeAccessEmailRule], +// [AccessGroupUpdateParamsIncludeAccessEmailListRule], +// [AccessGroupUpdateParamsIncludeAccessDomainRule], +// [AccessGroupUpdateParamsIncludeAccessEveryoneRule], +// [AccessGroupUpdateParamsIncludeAccessIPRule], +// [AccessGroupUpdateParamsIncludeAccessIPListRule], +// [AccessGroupUpdateParamsIncludeAccessCertificateRule], +// [AccessGroupUpdateParamsIncludeAccessAccessGroupRule], +// [AccessGroupUpdateParamsIncludeAccessAzureGroupRule], +// [AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRule], +// [AccessGroupUpdateParamsIncludeAccessGsuiteGroupRule], +// [AccessGroupUpdateParamsIncludeAccessOktaGroupRule], +// [AccessGroupUpdateParamsIncludeAccessSamlGroupRule], +// [AccessGroupUpdateParamsIncludeAccessServiceTokenRule], +// [AccessGroupUpdateParamsIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateParamsIncludeAccessExternalEvaluationRule], +// [AccessGroupUpdateParamsIncludeAccessCountryRule], +// [AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRule], +// [AccessGroupUpdateParamsIncludeAccessDevicePostureRule]. +type AccessGroupUpdateParamsInclude interface { + implementsAccessGroupUpdateParamsInclude() +} + +// Matches a specific email. +type AccessGroupUpdateParamsIncludeAccessEmailRule struct { + Email param.Field[AccessGroupUpdateParamsIncludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailRule) implementsAccessGroupUpdateParamsInclude() {} + +type AccessGroupUpdateParamsIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupUpdateParamsIncludeAccessEmailListRule struct { + EmailList param.Field[AccessGroupUpdateParamsIncludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailListRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupUpdateParamsIncludeAccessDomainRule struct { + EmailDomain param.Field[AccessGroupUpdateParamsIncludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessDomainRule) implementsAccessGroupUpdateParamsInclude() {} + +type AccessGroupUpdateParamsIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupUpdateParamsIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessEveryoneRule) implementsAccessGroupUpdateParamsInclude() { +} + +// Matches an IP address block. +type AccessGroupUpdateParamsIncludeAccessIPRule struct { + IP param.Field[AccessGroupUpdateParamsIncludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessIPRule) implementsAccessGroupUpdateParamsInclude() {} + +type AccessGroupUpdateParamsIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateParamsIncludeAccessIPListRule struct { + IPList param.Field[AccessGroupUpdateParamsIncludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessIPListRule) implementsAccessGroupUpdateParamsInclude() {} + +type AccessGroupUpdateParamsIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateParamsIncludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessCertificateRule) implementsAccessGroupUpdateParamsInclude() { +} + +// Matches an Access group. +type AccessGroupUpdateParamsIncludeAccessAccessGroupRule struct { + Group param.Field[AccessGroupUpdateParamsIncludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessAccessGroupRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateParamsIncludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupUpdateParamsIncludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessAzureGroupRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateParamsIncludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupUpdateParamsIncludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessGsuiteGroupRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateParamsIncludeAccessOktaGroupRule struct { + Okta param.Field[AccessGroupUpdateParamsIncludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessOktaGroupRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateParamsIncludeAccessSamlGroupRule struct { + Saml param.Field[AccessGroupUpdateParamsIncludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessSamlGroupRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateParamsIncludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupUpdateParamsIncludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessServiceTokenRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateParamsIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateParamsInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateParamsIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessExternalEvaluationRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupUpdateParamsIncludeAccessCountryRule struct { + Geo param.Field[AccessGroupUpdateParamsIncludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessCountryRule) implementsAccessGroupUpdateParamsInclude() {} + +type AccessGroupUpdateParamsIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateParamsIncludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupUpdateParamsIncludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsIncludeAccessDevicePostureRule) implementsAccessGroupUpdateParamsInclude() { +} + +type AccessGroupUpdateParamsIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupUpdateParamsIncludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by [AccessGroupUpdateParamsExcludeAccessEmailRule], +// [AccessGroupUpdateParamsExcludeAccessEmailListRule], +// [AccessGroupUpdateParamsExcludeAccessDomainRule], +// [AccessGroupUpdateParamsExcludeAccessEveryoneRule], +// [AccessGroupUpdateParamsExcludeAccessIPRule], +// [AccessGroupUpdateParamsExcludeAccessIPListRule], +// [AccessGroupUpdateParamsExcludeAccessCertificateRule], +// [AccessGroupUpdateParamsExcludeAccessAccessGroupRule], +// [AccessGroupUpdateParamsExcludeAccessAzureGroupRule], +// [AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRule], +// [AccessGroupUpdateParamsExcludeAccessGsuiteGroupRule], +// [AccessGroupUpdateParamsExcludeAccessOktaGroupRule], +// [AccessGroupUpdateParamsExcludeAccessSamlGroupRule], +// [AccessGroupUpdateParamsExcludeAccessServiceTokenRule], +// [AccessGroupUpdateParamsExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateParamsExcludeAccessExternalEvaluationRule], +// [AccessGroupUpdateParamsExcludeAccessCountryRule], +// [AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRule], +// [AccessGroupUpdateParamsExcludeAccessDevicePostureRule]. +type AccessGroupUpdateParamsExclude interface { + implementsAccessGroupUpdateParamsExclude() +} + +// Matches a specific email. +type AccessGroupUpdateParamsExcludeAccessEmailRule struct { + Email param.Field[AccessGroupUpdateParamsExcludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailRule) implementsAccessGroupUpdateParamsExclude() {} + +type AccessGroupUpdateParamsExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupUpdateParamsExcludeAccessEmailListRule struct { + EmailList param.Field[AccessGroupUpdateParamsExcludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailListRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupUpdateParamsExcludeAccessDomainRule struct { + EmailDomain param.Field[AccessGroupUpdateParamsExcludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessDomainRule) implementsAccessGroupUpdateParamsExclude() {} + +type AccessGroupUpdateParamsExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupUpdateParamsExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessEveryoneRule) implementsAccessGroupUpdateParamsExclude() { +} + +// Matches an IP address block. +type AccessGroupUpdateParamsExcludeAccessIPRule struct { + IP param.Field[AccessGroupUpdateParamsExcludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessIPRule) implementsAccessGroupUpdateParamsExclude() {} + +type AccessGroupUpdateParamsExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateParamsExcludeAccessIPListRule struct { + IPList param.Field[AccessGroupUpdateParamsExcludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessIPListRule) implementsAccessGroupUpdateParamsExclude() {} + +type AccessGroupUpdateParamsExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateParamsExcludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessCertificateRule) implementsAccessGroupUpdateParamsExclude() { +} + +// Matches an Access group. +type AccessGroupUpdateParamsExcludeAccessAccessGroupRule struct { + Group param.Field[AccessGroupUpdateParamsExcludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessAccessGroupRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateParamsExcludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupUpdateParamsExcludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessAzureGroupRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateParamsExcludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupUpdateParamsExcludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessGsuiteGroupRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateParamsExcludeAccessOktaGroupRule struct { + Okta param.Field[AccessGroupUpdateParamsExcludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessOktaGroupRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateParamsExcludeAccessSamlGroupRule struct { + Saml param.Field[AccessGroupUpdateParamsExcludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessSamlGroupRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateParamsExcludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupUpdateParamsExcludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessServiceTokenRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateParamsExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateParamsExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateParamsExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessExternalEvaluationRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupUpdateParamsExcludeAccessCountryRule struct { + Geo param.Field[AccessGroupUpdateParamsExcludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessCountryRule) implementsAccessGroupUpdateParamsExclude() {} + +type AccessGroupUpdateParamsExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateParamsExcludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupUpdateParamsExcludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsExcludeAccessDevicePostureRule) implementsAccessGroupUpdateParamsExclude() { +} + +type AccessGroupUpdateParamsExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupUpdateParamsExcludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by [AccessGroupUpdateParamsRequireAccessEmailRule], +// [AccessGroupUpdateParamsRequireAccessEmailListRule], +// [AccessGroupUpdateParamsRequireAccessDomainRule], +// [AccessGroupUpdateParamsRequireAccessEveryoneRule], +// [AccessGroupUpdateParamsRequireAccessIPRule], +// [AccessGroupUpdateParamsRequireAccessIPListRule], +// [AccessGroupUpdateParamsRequireAccessCertificateRule], +// [AccessGroupUpdateParamsRequireAccessAccessGroupRule], +// [AccessGroupUpdateParamsRequireAccessAzureGroupRule], +// [AccessGroupUpdateParamsRequireAccessGitHubOrganizationRule], +// [AccessGroupUpdateParamsRequireAccessGsuiteGroupRule], +// [AccessGroupUpdateParamsRequireAccessOktaGroupRule], +// [AccessGroupUpdateParamsRequireAccessSamlGroupRule], +// [AccessGroupUpdateParamsRequireAccessServiceTokenRule], +// [AccessGroupUpdateParamsRequireAccessAnyValidServiceTokenRule], +// [AccessGroupUpdateParamsRequireAccessExternalEvaluationRule], +// [AccessGroupUpdateParamsRequireAccessCountryRule], +// [AccessGroupUpdateParamsRequireAccessAuthenticationMethodRule], +// [AccessGroupUpdateParamsRequireAccessDevicePostureRule]. +type AccessGroupUpdateParamsRequire interface { + implementsAccessGroupUpdateParamsRequire() +} + +// Matches a specific email. +type AccessGroupUpdateParamsRequireAccessEmailRule struct { + Email param.Field[AccessGroupUpdateParamsRequireAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessEmailRule) implementsAccessGroupUpdateParamsRequire() {} + +type AccessGroupUpdateParamsRequireAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupUpdateParamsRequireAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupUpdateParamsRequireAccessEmailListRule struct { + EmailList param.Field[AccessGroupUpdateParamsRequireAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessEmailListRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupUpdateParamsRequireAccessDomainRule struct { + EmailDomain param.Field[AccessGroupUpdateParamsRequireAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessDomainRule) implementsAccessGroupUpdateParamsRequire() {} + +type AccessGroupUpdateParamsRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupUpdateParamsRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessEveryoneRule) implementsAccessGroupUpdateParamsRequire() { +} + +// Matches an IP address block. +type AccessGroupUpdateParamsRequireAccessIPRule struct { + IP param.Field[AccessGroupUpdateParamsRequireAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessIPRule) implementsAccessGroupUpdateParamsRequire() {} + +type AccessGroupUpdateParamsRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupUpdateParamsRequireAccessIPListRule struct { + IPList param.Field[AccessGroupUpdateParamsRequireAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessIPListRule) implementsAccessGroupUpdateParamsRequire() {} + +type AccessGroupUpdateParamsRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupUpdateParamsRequireAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessCertificateRule) implementsAccessGroupUpdateParamsRequire() { +} + +// Matches an Access group. +type AccessGroupUpdateParamsRequireAccessAccessGroupRule struct { + Group param.Field[AccessGroupUpdateParamsRequireAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessAccessGroupRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupUpdateParamsRequireAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupUpdateParamsRequireAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessAzureGroupRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupUpdateParamsRequireAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessGitHubOrganizationRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupUpdateParamsRequireAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupUpdateParamsRequireAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessGsuiteGroupRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupUpdateParamsRequireAccessOktaGroupRule struct { + Okta param.Field[AccessGroupUpdateParamsRequireAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessOktaGroupRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupUpdateParamsRequireAccessSamlGroupRule struct { + Saml param.Field[AccessGroupUpdateParamsRequireAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessSamlGroupRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupUpdateParamsRequireAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupUpdateParamsRequireAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessServiceTokenRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupUpdateParamsRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessAnyValidServiceTokenRule) implementsAccessGroupUpdateParamsRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupUpdateParamsRequireAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessExternalEvaluationRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupUpdateParamsRequireAccessCountryRule struct { + Geo param.Field[AccessGroupUpdateParamsRequireAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessCountryRule) implementsAccessGroupUpdateParamsRequire() {} + +type AccessGroupUpdateParamsRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupUpdateParamsRequireAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessAuthenticationMethodRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupUpdateParamsRequireAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupUpdateParamsRequireAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupUpdateParamsRequireAccessDevicePostureRule) implementsAccessGroupUpdateParamsRequire() { +} + +type AccessGroupUpdateParamsRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupUpdateParamsRequireAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessGroupAccessGroupsNewAnAccessGroupParams struct { + // Rules evaluated with an OR logical operator. A user needs to meet only one of + // the Include rules. + Include param.Field[[]AccessGroupAccessGroupsNewAnAccessGroupParamsInclude] `json:"include,required"` + // The name of the Access group. + Name param.Field[string] `json:"name,required"` + // Rules evaluated with a NOT logical operator. To match a policy, a user cannot + // meet any of the Exclude rules. + Exclude param.Field[[]AccessGroupAccessGroupsNewAnAccessGroupParamsExclude] `json:"exclude"` + // Whether this is the default group + IsDefault param.Field[bool] `json:"is_default"` + // Rules evaluated with an AND logical operator. To match a policy, a user must + // meet all of the Require rules. + Require param.Field[[]AccessGroupAccessGroupsNewAnAccessGroupParamsRequire] `json:"require"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupParamsInclude interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule struct { + Email param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRule struct { + EmailList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRule struct { + EmailDomain param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRule struct { + IP param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRule struct { + IPList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRule struct { + Group param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRule struct { + Okta param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRule struct { + Saml param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRule struct { + Geo param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsInclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExclude interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule struct { + Email param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRule struct { + EmailList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRule struct { + EmailDomain param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRule struct { + IP param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRule struct { + IPList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRule struct { + Group param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRule struct { + Okta param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRule struct { + Saml param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRule struct { + Geo param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsExclude() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific email. +// +// Satisfied by +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEveryoneRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCertificateRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAnyValidServiceTokenRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRule], +// [AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRule]. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequire interface { + implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() +} + +// Matches a specific email. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule struct { + Email param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail struct { + // The email of the user. + Email param.Field[string] `json:"email,required" format:"email"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an email address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRule struct { + EmailList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRuleEmailList] `json:"email_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRuleEmailList struct { + // The ID of a previously created email list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailListRuleEmailList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Match an entire email domain. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRule struct { + EmailDomain param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRuleEmailDomain] `json:"email_domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRuleEmailDomain struct { + // The email domain to match. + Domain param.Field[string] `json:"domain,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDomainRuleEmailDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches everyone. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEveryoneRule struct { + // An empty object which matches on all users. + Everyone param.Field[interface{}] `json:"everyone,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEveryoneRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEveryoneRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +// Matches an IP address block. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRule struct { + IP param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRuleIP] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRuleIP struct { + // An IPv4 or IPv6 CIDR block. + IP param.Field[string] `json:"ip,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPRuleIP) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an IP address from a list. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRule struct { + IPList param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRuleIPList] `json:"ip_list,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRuleIPList struct { + // The ID of a previously created IP list. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessIPListRuleIPList) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid client certificate. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCertificateRule struct { + Certificate param.Field[interface{}] `json:"certificate,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCertificateRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCertificateRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +// Matches an Access group. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRule struct { + Group param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRuleGroup] `json:"group,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRuleGroup struct { + // The ID of a previously created Access group. + ID param.Field[string] `json:"id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAccessGroupRuleGroup) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Azure group. Requires an Azure identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRule struct { + AzureAd param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRuleAzureAd] `json:"azureAD,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRuleAzureAd struct { + // The ID of an Azure group. + ID param.Field[string] `json:"id,required"` + // The ID of your Azure identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAzureGroupRuleAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a Github organization. Requires a Github identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRule struct { + GitHubOrganization param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRuleGitHubOrganization] `json:"github-organization,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRuleGitHubOrganization struct { + // The ID of your Github identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The name of the organization. + Name param.Field[string] `json:"name,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGitHubOrganizationRuleGitHubOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a group in Google Workspace. Requires a Google Workspace identity +// provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRule struct { + Gsuite param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRuleGsuite] `json:"gsuite,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRuleGsuite struct { + // The ID of your Google Workspace identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Google Workspace group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessGsuiteGroupRuleGsuite) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches an Okta group. Requires an Okta identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRule struct { + Okta param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRuleOkta] `json:"okta,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRuleOkta struct { + // The ID of your Okta identity provider. + ConnectionID param.Field[string] `json:"connection_id,required"` + // The email of the Okta group. + Email param.Field[string] `json:"email,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessOktaGroupRuleOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a SAML group. Requires a SAML identity provider. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRule struct { + Saml param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRuleSaml] `json:"saml,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRuleSaml struct { + // The name of the SAML attribute. + AttributeName param.Field[string] `json:"attribute_name,required"` + // The SAML attribute value to look for. + AttributeValue param.Field[string] `json:"attribute_value,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessSamlGroupRuleSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRule struct { + ServiceToken param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRuleServiceToken] `json:"service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRuleServiceToken struct { + // The ID of a Service Token. + TokenID param.Field[string] `json:"token_id,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessServiceTokenRuleServiceToken) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches any valid Access Service Token +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAnyValidServiceTokenRule struct { + // An empty object which matches on all service tokens. + AnyValidServiceToken param.Field[interface{}] `json:"any_valid_service_token,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAnyValidServiceTokenRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAnyValidServiceTokenRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +// Create Allow or Block policies which evaluate the user based on custom criteria. +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRule struct { + ExternalEvaluation param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRuleExternalEvaluation] `json:"external_evaluation,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRuleExternalEvaluation struct { + // The API endpoint containing your business logic. + EvaluateURL param.Field[string] `json:"evaluate_url,required"` + // The API endpoint containing the key that Access uses to verify that the response + // came from your API. + KeysURL param.Field[string] `json:"keys_url,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessExternalEvaluationRuleExternalEvaluation) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Matches a specific country +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRule struct { + Geo param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRuleGeo] `json:"geo,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRuleGeo struct { + // The country code that should be matched. + CountryCode param.Field[string] `json:"country_code,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessCountryRuleGeo) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforce different MFA options +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRule struct { + AuthMethod param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRuleAuthMethod] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRuleAuthMethod struct { + // The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176. + AuthMethod param.Field[string] `json:"auth_method,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessAuthenticationMethodRuleAuthMethod) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Enforces a device posture rule has run successfully +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRule struct { + DevicePosture param.Field[AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRuleDevicePosture] `json:"device_posture,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRule) implementsAccessGroupAccessGroupsNewAnAccessGroupParamsRequire() { +} + +type AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRuleDevicePosture struct { + // The ID of a device posture integration. + IntegrationUid param.Field[string] `json:"integration_uid,required"` +} + +func (r AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessDevicePostureRuleDevicePosture) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accessgroup_test.go b/accessgroup_test.go new file mode 100644 index 00000000000..2d848bdf3b1 --- /dev/null +++ b/accessgroup_test.go @@ -0,0 +1,253 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessGroupGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Groups.Get( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessGroupUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Groups.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessGroupUpdateParams{ + Include: cloudflare.F([]cloudflare.AccessGroupUpdateParamsInclude{cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + Name: cloudflare.F("Allow devs"), + Exclude: cloudflare.F([]cloudflare.AccessGroupUpdateParamsExclude{cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + IsDefault: cloudflare.F(true), + Require: cloudflare.F([]cloudflare.AccessGroupUpdateParamsRequire{cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupUpdateParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessGroupDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Groups.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessGroupAccessGroupsNewAnAccessGroupWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Groups.AccessGroupsNewAnAccessGroup( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParams{ + Include: cloudflare.F([]cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsInclude{cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsIncludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + Name: cloudflare.F("Allow devs"), + Exclude: cloudflare.F([]cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExclude{cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsExcludeAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + IsDefault: cloudflare.F(true), + Require: cloudflare.F([]cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequire{cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + }), cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRule{ + Email: cloudflare.F(cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParamsRequireAccessEmailRuleEmail{ + Email: cloudflare.F("test@example.com"), + }), + })}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessGroupAccessGroupsListAccessGroups(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Groups.AccessGroupsListAccessGroups( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessidentityprovider.go b/accessidentityprovider.go new file mode 100644 index 00000000000..f3edf120479 --- /dev/null +++ b/accessidentityprovider.go @@ -0,0 +1,9928 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessIdentityProviderService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessIdentityProviderService] +// method instead. +type AccessIdentityProviderService struct { + Options []option.RequestOption +} + +// NewAccessIdentityProviderService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessIdentityProviderService(opts ...option.RequestOption) (r *AccessIdentityProviderService) { + r = &AccessIdentityProviderService{} + r.Options = opts + return +} + +// Fetches a configured identity provider. +func (r *AccessIdentityProviderService) Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessIdentityProviderGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/identity_providers/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates a configured identity provider. +func (r *AccessIdentityProviderService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body AccessIdentityProviderUpdateParams, opts ...option.RequestOption) (res *AccessIdentityProviderUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/identity_providers/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Deletes an identity provider from Access. +func (r *AccessIdentityProviderService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessIdentityProviderDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/identity_providers/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Adds a new identity provider to Access. +func (r *AccessIdentityProviderService) AccessIdentityProvidersAddAnAccessIdentityProvider(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams, opts ...option.RequestOption) (res *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/identity_providers", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists all configured identity providers. +func (r *AccessIdentityProviderService) AccessIdentityProvidersListAccessIdentityProviders(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/identity_providers", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessIdentityProviderGetResponse struct { + Errors []AccessIdentityProviderGetResponseError `json:"errors"` + Messages []AccessIdentityProviderGetResponseMessage `json:"messages"` + Result AccessIdentityProviderGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccessIdentityProviderGetResponseSuccess `json:"success"` + JSON accessIdentityProviderGetResponseJSON `json:"-"` +} + +// accessIdentityProviderGetResponseJSON contains the JSON metadata for the struct +// [AccessIdentityProviderGetResponse] +type accessIdentityProviderGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderGetResponseErrorJSON `json:"-"` +} + +// accessIdentityProviderGetResponseErrorJSON contains the JSON metadata for the +// struct [AccessIdentityProviderGetResponseError] +type accessIdentityProviderGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderGetResponseMessageJSON `json:"-"` +} + +// accessIdentityProviderGetResponseMessageJSON contains the JSON metadata for the +// struct [AccessIdentityProviderGetResponseMessage] +type accessIdentityProviderGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [AccessIdentityProviderGetResponseResultAccessAzureAd], +// [AccessIdentityProviderGetResponseResultAccessCentrify], +// [AccessIdentityProviderGetResponseResultAccessFacebook], +// [AccessIdentityProviderGetResponseResultAccessGitHub], +// [AccessIdentityProviderGetResponseResultAccessGoogle], +// [AccessIdentityProviderGetResponseResultAccessGoogleApps], +// [AccessIdentityProviderGetResponseResultAccessLinkedin], +// [AccessIdentityProviderGetResponseResultAccessOidc], +// [AccessIdentityProviderGetResponseResultAccessOkta], +// [AccessIdentityProviderGetResponseResultAccessOnelogin], +// [AccessIdentityProviderGetResponseResultAccessPingone], +// [AccessIdentityProviderGetResponseResultAccessSaml], +// [AccessIdentityProviderGetResponseResultAccessYandex] or +// [AccessIdentityProviderGetResponseResultAccessOnetimepin]. +type AccessIdentityProviderGetResponseResult interface { + implementsAccessIdentityProviderGetResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessIdentityProviderGetResponseResult)(nil)).Elem(), "") +} + +type AccessIdentityProviderGetResponseResultAccessAzureAd struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessAzureAdConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessAzureAdScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessAzureAdType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessAzureAdJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessAzureAdJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessAzureAd] +type accessIdentityProviderGetResponseResultAccessAzureAdJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessAzureAd) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessAzureAdConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled bool `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID string `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups bool `json:"support_groups"` + JSON accessIdentityProviderGetResponseResultAccessAzureAdConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessAzureAdConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessAzureAdConfig] +type accessIdentityProviderGetResponseResultAccessAzureAdConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + ConditionalAccessEnabled apijson.Field + DirectoryID apijson.Field + EmailClaimName apijson.Field + SupportGroups apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessAzureAdConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessAzureAdScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessAzureAdScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessAzureAdScimConfig] +type accessIdentityProviderGetResponseResultAccessAzureAdScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessAzureAdScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessAzureAdType string + +const ( + AccessIdentityProviderGetResponseResultAccessAzureAdTypeOnetimepin AccessIdentityProviderGetResponseResultAccessAzureAdType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeAzureAd AccessIdentityProviderGetResponseResultAccessAzureAdType = "azureAD" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeSaml AccessIdentityProviderGetResponseResultAccessAzureAdType = "saml" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeCentrify AccessIdentityProviderGetResponseResultAccessAzureAdType = "centrify" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeFacebook AccessIdentityProviderGetResponseResultAccessAzureAdType = "facebook" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeGitHub AccessIdentityProviderGetResponseResultAccessAzureAdType = "github" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeGoogleApps AccessIdentityProviderGetResponseResultAccessAzureAdType = "google-apps" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeGoogle AccessIdentityProviderGetResponseResultAccessAzureAdType = "google" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeLinkedin AccessIdentityProviderGetResponseResultAccessAzureAdType = "linkedin" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeOidc AccessIdentityProviderGetResponseResultAccessAzureAdType = "oidc" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeOkta AccessIdentityProviderGetResponseResultAccessAzureAdType = "okta" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeOnelogin AccessIdentityProviderGetResponseResultAccessAzureAdType = "onelogin" + AccessIdentityProviderGetResponseResultAccessAzureAdTypePingone AccessIdentityProviderGetResponseResultAccessAzureAdType = "pingone" + AccessIdentityProviderGetResponseResultAccessAzureAdTypeYandex AccessIdentityProviderGetResponseResultAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessCentrify struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessCentrifyConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessCentrifyScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessCentrifyType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessCentrifyJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessCentrifyJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessCentrify] +type accessIdentityProviderGetResponseResultAccessCentrifyJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessCentrify) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessCentrify) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount string `json:"centrify_account"` + // Your centrify app id + CentrifyAppID string `json:"centrify_app_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderGetResponseResultAccessCentrifyConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessCentrifyConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessCentrifyConfig] +type accessIdentityProviderGetResponseResultAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessCentrifyScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessCentrifyScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessCentrifyScimConfig] +type accessIdentityProviderGetResponseResultAccessCentrifyScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessCentrifyScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessCentrifyType string + +const ( + AccessIdentityProviderGetResponseResultAccessCentrifyTypeOnetimepin AccessIdentityProviderGetResponseResultAccessCentrifyType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeAzureAd AccessIdentityProviderGetResponseResultAccessCentrifyType = "azureAD" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeSaml AccessIdentityProviderGetResponseResultAccessCentrifyType = "saml" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeCentrify AccessIdentityProviderGetResponseResultAccessCentrifyType = "centrify" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeFacebook AccessIdentityProviderGetResponseResultAccessCentrifyType = "facebook" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeGitHub AccessIdentityProviderGetResponseResultAccessCentrifyType = "github" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeGoogleApps AccessIdentityProviderGetResponseResultAccessCentrifyType = "google-apps" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeGoogle AccessIdentityProviderGetResponseResultAccessCentrifyType = "google" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeLinkedin AccessIdentityProviderGetResponseResultAccessCentrifyType = "linkedin" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeOidc AccessIdentityProviderGetResponseResultAccessCentrifyType = "oidc" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeOkta AccessIdentityProviderGetResponseResultAccessCentrifyType = "okta" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeOnelogin AccessIdentityProviderGetResponseResultAccessCentrifyType = "onelogin" + AccessIdentityProviderGetResponseResultAccessCentrifyTypePingone AccessIdentityProviderGetResponseResultAccessCentrifyType = "pingone" + AccessIdentityProviderGetResponseResultAccessCentrifyTypeYandex AccessIdentityProviderGetResponseResultAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessFacebook struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessFacebookConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessFacebookScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessFacebookType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessFacebookJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessFacebookJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessFacebook] +type accessIdentityProviderGetResponseResultAccessFacebookJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessFacebook) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderGetResponseResultAccessFacebookConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessFacebookConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessFacebookConfig] +type accessIdentityProviderGetResponseResultAccessFacebookConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessFacebookConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessFacebookScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessFacebookScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessFacebookScimConfig] +type accessIdentityProviderGetResponseResultAccessFacebookScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessFacebookScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessFacebookType string + +const ( + AccessIdentityProviderGetResponseResultAccessFacebookTypeOnetimepin AccessIdentityProviderGetResponseResultAccessFacebookType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessFacebookTypeAzureAd AccessIdentityProviderGetResponseResultAccessFacebookType = "azureAD" + AccessIdentityProviderGetResponseResultAccessFacebookTypeSaml AccessIdentityProviderGetResponseResultAccessFacebookType = "saml" + AccessIdentityProviderGetResponseResultAccessFacebookTypeCentrify AccessIdentityProviderGetResponseResultAccessFacebookType = "centrify" + AccessIdentityProviderGetResponseResultAccessFacebookTypeFacebook AccessIdentityProviderGetResponseResultAccessFacebookType = "facebook" + AccessIdentityProviderGetResponseResultAccessFacebookTypeGitHub AccessIdentityProviderGetResponseResultAccessFacebookType = "github" + AccessIdentityProviderGetResponseResultAccessFacebookTypeGoogleApps AccessIdentityProviderGetResponseResultAccessFacebookType = "google-apps" + AccessIdentityProviderGetResponseResultAccessFacebookTypeGoogle AccessIdentityProviderGetResponseResultAccessFacebookType = "google" + AccessIdentityProviderGetResponseResultAccessFacebookTypeLinkedin AccessIdentityProviderGetResponseResultAccessFacebookType = "linkedin" + AccessIdentityProviderGetResponseResultAccessFacebookTypeOidc AccessIdentityProviderGetResponseResultAccessFacebookType = "oidc" + AccessIdentityProviderGetResponseResultAccessFacebookTypeOkta AccessIdentityProviderGetResponseResultAccessFacebookType = "okta" + AccessIdentityProviderGetResponseResultAccessFacebookTypeOnelogin AccessIdentityProviderGetResponseResultAccessFacebookType = "onelogin" + AccessIdentityProviderGetResponseResultAccessFacebookTypePingone AccessIdentityProviderGetResponseResultAccessFacebookType = "pingone" + AccessIdentityProviderGetResponseResultAccessFacebookTypeYandex AccessIdentityProviderGetResponseResultAccessFacebookType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessGitHub struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessGitHubConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessGitHubScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessGitHubType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessGitHubJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGitHubJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessGitHub] +type accessIdentityProviderGetResponseResultAccessGitHubJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessGitHub) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderGetResponseResultAccessGitHubConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGitHubConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGitHubConfig] +type accessIdentityProviderGetResponseResultAccessGitHubConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGitHubConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessGitHubScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGitHubScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGitHubScimConfig] +type accessIdentityProviderGetResponseResultAccessGitHubScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGitHubScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessGitHubType string + +const ( + AccessIdentityProviderGetResponseResultAccessGitHubTypeOnetimepin AccessIdentityProviderGetResponseResultAccessGitHubType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessGitHubTypeAzureAd AccessIdentityProviderGetResponseResultAccessGitHubType = "azureAD" + AccessIdentityProviderGetResponseResultAccessGitHubTypeSaml AccessIdentityProviderGetResponseResultAccessGitHubType = "saml" + AccessIdentityProviderGetResponseResultAccessGitHubTypeCentrify AccessIdentityProviderGetResponseResultAccessGitHubType = "centrify" + AccessIdentityProviderGetResponseResultAccessGitHubTypeFacebook AccessIdentityProviderGetResponseResultAccessGitHubType = "facebook" + AccessIdentityProviderGetResponseResultAccessGitHubTypeGitHub AccessIdentityProviderGetResponseResultAccessGitHubType = "github" + AccessIdentityProviderGetResponseResultAccessGitHubTypeGoogleApps AccessIdentityProviderGetResponseResultAccessGitHubType = "google-apps" + AccessIdentityProviderGetResponseResultAccessGitHubTypeGoogle AccessIdentityProviderGetResponseResultAccessGitHubType = "google" + AccessIdentityProviderGetResponseResultAccessGitHubTypeLinkedin AccessIdentityProviderGetResponseResultAccessGitHubType = "linkedin" + AccessIdentityProviderGetResponseResultAccessGitHubTypeOidc AccessIdentityProviderGetResponseResultAccessGitHubType = "oidc" + AccessIdentityProviderGetResponseResultAccessGitHubTypeOkta AccessIdentityProviderGetResponseResultAccessGitHubType = "okta" + AccessIdentityProviderGetResponseResultAccessGitHubTypeOnelogin AccessIdentityProviderGetResponseResultAccessGitHubType = "onelogin" + AccessIdentityProviderGetResponseResultAccessGitHubTypePingone AccessIdentityProviderGetResponseResultAccessGitHubType = "pingone" + AccessIdentityProviderGetResponseResultAccessGitHubTypeYandex AccessIdentityProviderGetResponseResultAccessGitHubType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessGoogle struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessGoogleConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessGoogleScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessGoogleType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessGoogleJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessGoogle] +type accessIdentityProviderGetResponseResultAccessGoogleJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessGoogle) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessGoogleConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderGetResponseResultAccessGoogleConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGoogleConfig] +type accessIdentityProviderGetResponseResultAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessGoogleScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGoogleScimConfig] +type accessIdentityProviderGetResponseResultAccessGoogleScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogleScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessGoogleType string + +const ( + AccessIdentityProviderGetResponseResultAccessGoogleTypeOnetimepin AccessIdentityProviderGetResponseResultAccessGoogleType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessGoogleTypeAzureAd AccessIdentityProviderGetResponseResultAccessGoogleType = "azureAD" + AccessIdentityProviderGetResponseResultAccessGoogleTypeSaml AccessIdentityProviderGetResponseResultAccessGoogleType = "saml" + AccessIdentityProviderGetResponseResultAccessGoogleTypeCentrify AccessIdentityProviderGetResponseResultAccessGoogleType = "centrify" + AccessIdentityProviderGetResponseResultAccessGoogleTypeFacebook AccessIdentityProviderGetResponseResultAccessGoogleType = "facebook" + AccessIdentityProviderGetResponseResultAccessGoogleTypeGitHub AccessIdentityProviderGetResponseResultAccessGoogleType = "github" + AccessIdentityProviderGetResponseResultAccessGoogleTypeGoogleApps AccessIdentityProviderGetResponseResultAccessGoogleType = "google-apps" + AccessIdentityProviderGetResponseResultAccessGoogleTypeGoogle AccessIdentityProviderGetResponseResultAccessGoogleType = "google" + AccessIdentityProviderGetResponseResultAccessGoogleTypeLinkedin AccessIdentityProviderGetResponseResultAccessGoogleType = "linkedin" + AccessIdentityProviderGetResponseResultAccessGoogleTypeOidc AccessIdentityProviderGetResponseResultAccessGoogleType = "oidc" + AccessIdentityProviderGetResponseResultAccessGoogleTypeOkta AccessIdentityProviderGetResponseResultAccessGoogleType = "okta" + AccessIdentityProviderGetResponseResultAccessGoogleTypeOnelogin AccessIdentityProviderGetResponseResultAccessGoogleType = "onelogin" + AccessIdentityProviderGetResponseResultAccessGoogleTypePingone AccessIdentityProviderGetResponseResultAccessGoogleType = "pingone" + AccessIdentityProviderGetResponseResultAccessGoogleTypeYandex AccessIdentityProviderGetResponseResultAccessGoogleType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessGoogleApps struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessGoogleAppsConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessGoogleAppsScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessGoogleAppsType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessGoogleAppsJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleAppsJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGoogleApps] +type accessIdentityProviderGetResponseResultAccessGoogleAppsJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessGoogleApps) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain string `json:"apps_domain"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderGetResponseResultAccessGoogleAppsConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleAppsConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGoogleAppsConfig] +type accessIdentityProviderGetResponseResultAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessGoogleAppsScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessGoogleAppsScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessGoogleAppsScimConfig] +type accessIdentityProviderGetResponseResultAccessGoogleAppsScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessGoogleAppsScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessGoogleAppsType string + +const ( + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeOnetimepin AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeAzureAd AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "azureAD" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeSaml AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "saml" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeCentrify AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "centrify" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeFacebook AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "facebook" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeGitHub AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "github" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeGoogleApps AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "google-apps" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeGoogle AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "google" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeLinkedin AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "linkedin" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeOidc AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "oidc" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeOkta AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "okta" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeOnelogin AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "onelogin" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypePingone AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "pingone" + AccessIdentityProviderGetResponseResultAccessGoogleAppsTypeYandex AccessIdentityProviderGetResponseResultAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessLinkedin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessLinkedinConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessLinkedinScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessLinkedinType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessLinkedinJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessLinkedinJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessLinkedin] +type accessIdentityProviderGetResponseResultAccessLinkedinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessLinkedin) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderGetResponseResultAccessLinkedinConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessLinkedinConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessLinkedinConfig] +type accessIdentityProviderGetResponseResultAccessLinkedinConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessLinkedinConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessLinkedinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessLinkedinScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessLinkedinScimConfig] +type accessIdentityProviderGetResponseResultAccessLinkedinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessLinkedinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessLinkedinType string + +const ( + AccessIdentityProviderGetResponseResultAccessLinkedinTypeOnetimepin AccessIdentityProviderGetResponseResultAccessLinkedinType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeAzureAd AccessIdentityProviderGetResponseResultAccessLinkedinType = "azureAD" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeSaml AccessIdentityProviderGetResponseResultAccessLinkedinType = "saml" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeCentrify AccessIdentityProviderGetResponseResultAccessLinkedinType = "centrify" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeFacebook AccessIdentityProviderGetResponseResultAccessLinkedinType = "facebook" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeGitHub AccessIdentityProviderGetResponseResultAccessLinkedinType = "github" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeGoogleApps AccessIdentityProviderGetResponseResultAccessLinkedinType = "google-apps" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeGoogle AccessIdentityProviderGetResponseResultAccessLinkedinType = "google" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeLinkedin AccessIdentityProviderGetResponseResultAccessLinkedinType = "linkedin" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeOidc AccessIdentityProviderGetResponseResultAccessLinkedinType = "oidc" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeOkta AccessIdentityProviderGetResponseResultAccessLinkedinType = "okta" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeOnelogin AccessIdentityProviderGetResponseResultAccessLinkedinType = "onelogin" + AccessIdentityProviderGetResponseResultAccessLinkedinTypePingone AccessIdentityProviderGetResponseResultAccessLinkedinType = "pingone" + AccessIdentityProviderGetResponseResultAccessLinkedinTypeYandex AccessIdentityProviderGetResponseResultAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessOidc struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessOidcConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessOidcScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessOidcType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessOidcJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOidcJSON contains the JSON metadata +// for the struct [AccessIdentityProviderGetResponseResultAccessOidc] +type accessIdentityProviderGetResponseResultAccessOidcJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOidc) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessOidc) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL string `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL string `json:"certs_url"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // OAuth scopes + Scopes []string `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL string `json:"token_url"` + JSON accessIdentityProviderGetResponseResultAccessOidcConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOidcConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOidcConfig] +type accessIdentityProviderGetResponseResultAccessOidcConfigJSON struct { + AuthURL apijson.Field + CertsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOidcConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessOidcScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOidcScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOidcScimConfig] +type accessIdentityProviderGetResponseResultAccessOidcScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOidcScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessOidcType string + +const ( + AccessIdentityProviderGetResponseResultAccessOidcTypeOnetimepin AccessIdentityProviderGetResponseResultAccessOidcType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessOidcTypeAzureAd AccessIdentityProviderGetResponseResultAccessOidcType = "azureAD" + AccessIdentityProviderGetResponseResultAccessOidcTypeSaml AccessIdentityProviderGetResponseResultAccessOidcType = "saml" + AccessIdentityProviderGetResponseResultAccessOidcTypeCentrify AccessIdentityProviderGetResponseResultAccessOidcType = "centrify" + AccessIdentityProviderGetResponseResultAccessOidcTypeFacebook AccessIdentityProviderGetResponseResultAccessOidcType = "facebook" + AccessIdentityProviderGetResponseResultAccessOidcTypeGitHub AccessIdentityProviderGetResponseResultAccessOidcType = "github" + AccessIdentityProviderGetResponseResultAccessOidcTypeGoogleApps AccessIdentityProviderGetResponseResultAccessOidcType = "google-apps" + AccessIdentityProviderGetResponseResultAccessOidcTypeGoogle AccessIdentityProviderGetResponseResultAccessOidcType = "google" + AccessIdentityProviderGetResponseResultAccessOidcTypeLinkedin AccessIdentityProviderGetResponseResultAccessOidcType = "linkedin" + AccessIdentityProviderGetResponseResultAccessOidcTypeOidc AccessIdentityProviderGetResponseResultAccessOidcType = "oidc" + AccessIdentityProviderGetResponseResultAccessOidcTypeOkta AccessIdentityProviderGetResponseResultAccessOidcType = "okta" + AccessIdentityProviderGetResponseResultAccessOidcTypeOnelogin AccessIdentityProviderGetResponseResultAccessOidcType = "onelogin" + AccessIdentityProviderGetResponseResultAccessOidcTypePingone AccessIdentityProviderGetResponseResultAccessOidcType = "pingone" + AccessIdentityProviderGetResponseResultAccessOidcTypeYandex AccessIdentityProviderGetResponseResultAccessOidcType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessOkta struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessOktaConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessOktaScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessOktaType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessOktaJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOktaJSON contains the JSON metadata +// for the struct [AccessIdentityProviderGetResponseResultAccessOkta] +type accessIdentityProviderGetResponseResultAccessOktaJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessOkta) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID string `json:"authorization_server_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your okta account url + OktaAccount string `json:"okta_account"` + JSON accessIdentityProviderGetResponseResultAccessOktaConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOktaConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOktaConfig] +type accessIdentityProviderGetResponseResultAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessOktaScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOktaScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOktaScimConfig] +type accessIdentityProviderGetResponseResultAccessOktaScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOktaScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessOktaType string + +const ( + AccessIdentityProviderGetResponseResultAccessOktaTypeOnetimepin AccessIdentityProviderGetResponseResultAccessOktaType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessOktaTypeAzureAd AccessIdentityProviderGetResponseResultAccessOktaType = "azureAD" + AccessIdentityProviderGetResponseResultAccessOktaTypeSaml AccessIdentityProviderGetResponseResultAccessOktaType = "saml" + AccessIdentityProviderGetResponseResultAccessOktaTypeCentrify AccessIdentityProviderGetResponseResultAccessOktaType = "centrify" + AccessIdentityProviderGetResponseResultAccessOktaTypeFacebook AccessIdentityProviderGetResponseResultAccessOktaType = "facebook" + AccessIdentityProviderGetResponseResultAccessOktaTypeGitHub AccessIdentityProviderGetResponseResultAccessOktaType = "github" + AccessIdentityProviderGetResponseResultAccessOktaTypeGoogleApps AccessIdentityProviderGetResponseResultAccessOktaType = "google-apps" + AccessIdentityProviderGetResponseResultAccessOktaTypeGoogle AccessIdentityProviderGetResponseResultAccessOktaType = "google" + AccessIdentityProviderGetResponseResultAccessOktaTypeLinkedin AccessIdentityProviderGetResponseResultAccessOktaType = "linkedin" + AccessIdentityProviderGetResponseResultAccessOktaTypeOidc AccessIdentityProviderGetResponseResultAccessOktaType = "oidc" + AccessIdentityProviderGetResponseResultAccessOktaTypeOkta AccessIdentityProviderGetResponseResultAccessOktaType = "okta" + AccessIdentityProviderGetResponseResultAccessOktaTypeOnelogin AccessIdentityProviderGetResponseResultAccessOktaType = "onelogin" + AccessIdentityProviderGetResponseResultAccessOktaTypePingone AccessIdentityProviderGetResponseResultAccessOktaType = "pingone" + AccessIdentityProviderGetResponseResultAccessOktaTypeYandex AccessIdentityProviderGetResponseResultAccessOktaType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessOnelogin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessOneloginConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessOneloginScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessOneloginType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessOneloginJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOneloginJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessOnelogin] +type accessIdentityProviderGetResponseResultAccessOneloginJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessOnelogin) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessOneloginConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount string `json:"onelogin_account"` + JSON accessIdentityProviderGetResponseResultAccessOneloginConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOneloginConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOneloginConfig] +type accessIdentityProviderGetResponseResultAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessOneloginScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOneloginScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOneloginScimConfig] +type accessIdentityProviderGetResponseResultAccessOneloginScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOneloginScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessOneloginType string + +const ( + AccessIdentityProviderGetResponseResultAccessOneloginTypeOnetimepin AccessIdentityProviderGetResponseResultAccessOneloginType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessOneloginTypeAzureAd AccessIdentityProviderGetResponseResultAccessOneloginType = "azureAD" + AccessIdentityProviderGetResponseResultAccessOneloginTypeSaml AccessIdentityProviderGetResponseResultAccessOneloginType = "saml" + AccessIdentityProviderGetResponseResultAccessOneloginTypeCentrify AccessIdentityProviderGetResponseResultAccessOneloginType = "centrify" + AccessIdentityProviderGetResponseResultAccessOneloginTypeFacebook AccessIdentityProviderGetResponseResultAccessOneloginType = "facebook" + AccessIdentityProviderGetResponseResultAccessOneloginTypeGitHub AccessIdentityProviderGetResponseResultAccessOneloginType = "github" + AccessIdentityProviderGetResponseResultAccessOneloginTypeGoogleApps AccessIdentityProviderGetResponseResultAccessOneloginType = "google-apps" + AccessIdentityProviderGetResponseResultAccessOneloginTypeGoogle AccessIdentityProviderGetResponseResultAccessOneloginType = "google" + AccessIdentityProviderGetResponseResultAccessOneloginTypeLinkedin AccessIdentityProviderGetResponseResultAccessOneloginType = "linkedin" + AccessIdentityProviderGetResponseResultAccessOneloginTypeOidc AccessIdentityProviderGetResponseResultAccessOneloginType = "oidc" + AccessIdentityProviderGetResponseResultAccessOneloginTypeOkta AccessIdentityProviderGetResponseResultAccessOneloginType = "okta" + AccessIdentityProviderGetResponseResultAccessOneloginTypeOnelogin AccessIdentityProviderGetResponseResultAccessOneloginType = "onelogin" + AccessIdentityProviderGetResponseResultAccessOneloginTypePingone AccessIdentityProviderGetResponseResultAccessOneloginType = "pingone" + AccessIdentityProviderGetResponseResultAccessOneloginTypeYandex AccessIdentityProviderGetResponseResultAccessOneloginType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessPingone struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessPingoneConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessPingoneScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessPingoneType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessPingoneJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessPingoneJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessPingone] +type accessIdentityProviderGetResponseResultAccessPingoneJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessPingone) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessPingoneConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID string `json:"ping_env_id"` + JSON accessIdentityProviderGetResponseResultAccessPingoneConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessPingoneConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessPingoneConfig] +type accessIdentityProviderGetResponseResultAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessPingoneScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessPingoneScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessPingoneScimConfig] +type accessIdentityProviderGetResponseResultAccessPingoneScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessPingoneScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessPingoneType string + +const ( + AccessIdentityProviderGetResponseResultAccessPingoneTypeOnetimepin AccessIdentityProviderGetResponseResultAccessPingoneType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessPingoneTypeAzureAd AccessIdentityProviderGetResponseResultAccessPingoneType = "azureAD" + AccessIdentityProviderGetResponseResultAccessPingoneTypeSaml AccessIdentityProviderGetResponseResultAccessPingoneType = "saml" + AccessIdentityProviderGetResponseResultAccessPingoneTypeCentrify AccessIdentityProviderGetResponseResultAccessPingoneType = "centrify" + AccessIdentityProviderGetResponseResultAccessPingoneTypeFacebook AccessIdentityProviderGetResponseResultAccessPingoneType = "facebook" + AccessIdentityProviderGetResponseResultAccessPingoneTypeGitHub AccessIdentityProviderGetResponseResultAccessPingoneType = "github" + AccessIdentityProviderGetResponseResultAccessPingoneTypeGoogleApps AccessIdentityProviderGetResponseResultAccessPingoneType = "google-apps" + AccessIdentityProviderGetResponseResultAccessPingoneTypeGoogle AccessIdentityProviderGetResponseResultAccessPingoneType = "google" + AccessIdentityProviderGetResponseResultAccessPingoneTypeLinkedin AccessIdentityProviderGetResponseResultAccessPingoneType = "linkedin" + AccessIdentityProviderGetResponseResultAccessPingoneTypeOidc AccessIdentityProviderGetResponseResultAccessPingoneType = "oidc" + AccessIdentityProviderGetResponseResultAccessPingoneTypeOkta AccessIdentityProviderGetResponseResultAccessPingoneType = "okta" + AccessIdentityProviderGetResponseResultAccessPingoneTypeOnelogin AccessIdentityProviderGetResponseResultAccessPingoneType = "onelogin" + AccessIdentityProviderGetResponseResultAccessPingoneTypePingone AccessIdentityProviderGetResponseResultAccessPingoneType = "pingone" + AccessIdentityProviderGetResponseResultAccessPingoneTypeYandex AccessIdentityProviderGetResponseResultAccessPingoneType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessSaml struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessSamlConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessSamlScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessSamlType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessSamlJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessSamlJSON contains the JSON metadata +// for the struct [AccessIdentityProviderGetResponseResultAccessSaml] +type accessIdentityProviderGetResponseResultAccessSamlJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessSaml) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes []string `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName string `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes []AccessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttribute `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + 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 + // signature, use the public key from the Access certs endpoints. + SignRequest bool `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL string `json:"sso_target_url"` + JSON accessIdentityProviderGetResponseResultAccessSamlConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessSamlConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessSamlConfig] +type accessIdentityProviderGetResponseResultAccessSamlConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdpPublicCerts apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessSamlConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName string `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName string `json:"header_name"` + JSON accessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttributeJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttributeJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttribute] +type accessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessSamlConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessSamlScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessSamlScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessSamlScimConfig] +type accessIdentityProviderGetResponseResultAccessSamlScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessSamlScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessSamlType string + +const ( + AccessIdentityProviderGetResponseResultAccessSamlTypeOnetimepin AccessIdentityProviderGetResponseResultAccessSamlType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessSamlTypeAzureAd AccessIdentityProviderGetResponseResultAccessSamlType = "azureAD" + AccessIdentityProviderGetResponseResultAccessSamlTypeSaml AccessIdentityProviderGetResponseResultAccessSamlType = "saml" + AccessIdentityProviderGetResponseResultAccessSamlTypeCentrify AccessIdentityProviderGetResponseResultAccessSamlType = "centrify" + AccessIdentityProviderGetResponseResultAccessSamlTypeFacebook AccessIdentityProviderGetResponseResultAccessSamlType = "facebook" + AccessIdentityProviderGetResponseResultAccessSamlTypeGitHub AccessIdentityProviderGetResponseResultAccessSamlType = "github" + AccessIdentityProviderGetResponseResultAccessSamlTypeGoogleApps AccessIdentityProviderGetResponseResultAccessSamlType = "google-apps" + AccessIdentityProviderGetResponseResultAccessSamlTypeGoogle AccessIdentityProviderGetResponseResultAccessSamlType = "google" + AccessIdentityProviderGetResponseResultAccessSamlTypeLinkedin AccessIdentityProviderGetResponseResultAccessSamlType = "linkedin" + AccessIdentityProviderGetResponseResultAccessSamlTypeOidc AccessIdentityProviderGetResponseResultAccessSamlType = "oidc" + AccessIdentityProviderGetResponseResultAccessSamlTypeOkta AccessIdentityProviderGetResponseResultAccessSamlType = "okta" + AccessIdentityProviderGetResponseResultAccessSamlTypeOnelogin AccessIdentityProviderGetResponseResultAccessSamlType = "onelogin" + AccessIdentityProviderGetResponseResultAccessSamlTypePingone AccessIdentityProviderGetResponseResultAccessSamlType = "pingone" + AccessIdentityProviderGetResponseResultAccessSamlTypeYandex AccessIdentityProviderGetResponseResultAccessSamlType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessYandex struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderGetResponseResultAccessYandexConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessYandexScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderGetResponseResultAccessYandexType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessYandexJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessYandexJSON contains the JSON +// metadata for the struct [AccessIdentityProviderGetResponseResultAccessYandex] +type accessIdentityProviderGetResponseResultAccessYandexJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessYandex) implementsAccessIdentityProviderGetResponseResult() { +} + +type AccessIdentityProviderGetResponseResultAccessYandexConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderGetResponseResultAccessYandexConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessYandexConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessYandexConfig] +type accessIdentityProviderGetResponseResultAccessYandexConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessYandexConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessYandexScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessYandexScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessYandexScimConfig] +type accessIdentityProviderGetResponseResultAccessYandexScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessYandexScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderGetResponseResultAccessYandexType string + +const ( + AccessIdentityProviderGetResponseResultAccessYandexTypeOnetimepin AccessIdentityProviderGetResponseResultAccessYandexType = "onetimepin" + AccessIdentityProviderGetResponseResultAccessYandexTypeAzureAd AccessIdentityProviderGetResponseResultAccessYandexType = "azureAD" + AccessIdentityProviderGetResponseResultAccessYandexTypeSaml AccessIdentityProviderGetResponseResultAccessYandexType = "saml" + AccessIdentityProviderGetResponseResultAccessYandexTypeCentrify AccessIdentityProviderGetResponseResultAccessYandexType = "centrify" + AccessIdentityProviderGetResponseResultAccessYandexTypeFacebook AccessIdentityProviderGetResponseResultAccessYandexType = "facebook" + AccessIdentityProviderGetResponseResultAccessYandexTypeGitHub AccessIdentityProviderGetResponseResultAccessYandexType = "github" + AccessIdentityProviderGetResponseResultAccessYandexTypeGoogleApps AccessIdentityProviderGetResponseResultAccessYandexType = "google-apps" + AccessIdentityProviderGetResponseResultAccessYandexTypeGoogle AccessIdentityProviderGetResponseResultAccessYandexType = "google" + AccessIdentityProviderGetResponseResultAccessYandexTypeLinkedin AccessIdentityProviderGetResponseResultAccessYandexType = "linkedin" + AccessIdentityProviderGetResponseResultAccessYandexTypeOidc AccessIdentityProviderGetResponseResultAccessYandexType = "oidc" + AccessIdentityProviderGetResponseResultAccessYandexTypeOkta AccessIdentityProviderGetResponseResultAccessYandexType = "okta" + AccessIdentityProviderGetResponseResultAccessYandexTypeOnelogin AccessIdentityProviderGetResponseResultAccessYandexType = "onelogin" + AccessIdentityProviderGetResponseResultAccessYandexTypePingone AccessIdentityProviderGetResponseResultAccessYandexType = "pingone" + AccessIdentityProviderGetResponseResultAccessYandexTypeYandex AccessIdentityProviderGetResponseResultAccessYandexType = "yandex" +) + +type AccessIdentityProviderGetResponseResultAccessOnetimepin struct { + // UUID + ID string `json:"id"` + Config interface{} `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderGetResponseResultAccessOnetimepinScimConfig `json:"scim_config"` + Type AccessIdentityProviderGetResponseResultAccessOnetimepinType `json:"type"` + JSON accessIdentityProviderGetResponseResultAccessOnetimepinJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOnetimepinJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOnetimepin] +type accessIdentityProviderGetResponseResultAccessOnetimepinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderGetResponseResultAccessOnetimepin) implementsAccessIdentityProviderGetResponseResult() { +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderGetResponseResultAccessOnetimepinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderGetResponseResultAccessOnetimepinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderGetResponseResultAccessOnetimepinScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderGetResponseResultAccessOnetimepinScimConfig] +type accessIdentityProviderGetResponseResultAccessOnetimepinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderGetResponseResultAccessOnetimepinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderGetResponseResultAccessOnetimepinType string + +const ( + AccessIdentityProviderGetResponseResultAccessOnetimepinTypeOnetimepin AccessIdentityProviderGetResponseResultAccessOnetimepinType = "onetimepin" +) + +// Whether the API call was successful +type AccessIdentityProviderGetResponseSuccess bool + +const ( + AccessIdentityProviderGetResponseSuccessTrue AccessIdentityProviderGetResponseSuccess = true +) + +type AccessIdentityProviderUpdateResponse struct { + Errors []AccessIdentityProviderUpdateResponseError `json:"errors"` + Messages []AccessIdentityProviderUpdateResponseMessage `json:"messages"` + Result AccessIdentityProviderUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessIdentityProviderUpdateResponseSuccess `json:"success"` + JSON accessIdentityProviderUpdateResponseJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseJSON contains the JSON metadata for the +// struct [AccessIdentityProviderUpdateResponse] +type accessIdentityProviderUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderUpdateResponseErrorJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseErrorJSON contains the JSON metadata for the +// struct [AccessIdentityProviderUpdateResponseError] +type accessIdentityProviderUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderUpdateResponseMessageJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseMessageJSON contains the JSON metadata for +// the struct [AccessIdentityProviderUpdateResponseMessage] +type accessIdentityProviderUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [AccessIdentityProviderUpdateResponseResultAccessAzureAd], +// [AccessIdentityProviderUpdateResponseResultAccessCentrify], +// [AccessIdentityProviderUpdateResponseResultAccessFacebook], +// [AccessIdentityProviderUpdateResponseResultAccessGitHub], +// [AccessIdentityProviderUpdateResponseResultAccessGoogle], +// [AccessIdentityProviderUpdateResponseResultAccessGoogleApps], +// [AccessIdentityProviderUpdateResponseResultAccessLinkedin], +// [AccessIdentityProviderUpdateResponseResultAccessOidc], +// [AccessIdentityProviderUpdateResponseResultAccessOkta], +// [AccessIdentityProviderUpdateResponseResultAccessOnelogin], +// [AccessIdentityProviderUpdateResponseResultAccessPingone], +// [AccessIdentityProviderUpdateResponseResultAccessSaml], +// [AccessIdentityProviderUpdateResponseResultAccessYandex] or +// [AccessIdentityProviderUpdateResponseResultAccessOnetimepin]. +type AccessIdentityProviderUpdateResponseResult interface { + implementsAccessIdentityProviderUpdateResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessIdentityProviderUpdateResponseResult)(nil)).Elem(), "") +} + +type AccessIdentityProviderUpdateResponseResultAccessAzureAd struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessAzureAdConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessAzureAdScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessAzureAdType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessAzureAdJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessAzureAdJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessAzureAd] +type accessIdentityProviderUpdateResponseResultAccessAzureAdJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessAzureAd) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessAzureAdConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled bool `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID string `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups bool `json:"support_groups"` + JSON accessIdentityProviderUpdateResponseResultAccessAzureAdConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessAzureAdConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessAzureAdConfig] +type accessIdentityProviderUpdateResponseResultAccessAzureAdConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + ConditionalAccessEnabled apijson.Field + DirectoryID apijson.Field + EmailClaimName apijson.Field + SupportGroups apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessAzureAdConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessAzureAdScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessAzureAdScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessAzureAdScimConfig] +type accessIdentityProviderUpdateResponseResultAccessAzureAdScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessAzureAdScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessAzureAdType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeSaml AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "saml" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeCentrify AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeFacebook AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeGitHub AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "github" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeGoogle AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "google" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeOidc AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeOkta AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "okta" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypePingone AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessAzureAdTypeYandex AccessIdentityProviderUpdateResponseResultAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessCentrify struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessCentrifyConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessCentrifyScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessCentrifyType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessCentrifyJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessCentrifyJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessCentrify] +type accessIdentityProviderUpdateResponseResultAccessCentrifyJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessCentrify) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessCentrify) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount string `json:"centrify_account"` + // Your centrify app id + CentrifyAppID string `json:"centrify_app_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderUpdateResponseResultAccessCentrifyConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessCentrifyConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessCentrifyConfig] +type accessIdentityProviderUpdateResponseResultAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessCentrifyScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessCentrifyScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessCentrifyScimConfig] +type accessIdentityProviderUpdateResponseResultAccessCentrifyScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessCentrifyScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessCentrifyType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeSaml AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "saml" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeCentrify AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeFacebook AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeGitHub AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "github" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeGoogle AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "google" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeOidc AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeOkta AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "okta" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypePingone AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessCentrifyTypeYandex AccessIdentityProviderUpdateResponseResultAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessFacebook struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessFacebookConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessFacebookScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessFacebookType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessFacebookJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessFacebookJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessFacebook] +type accessIdentityProviderUpdateResponseResultAccessFacebookJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessFacebook) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderUpdateResponseResultAccessFacebookConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessFacebookConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessFacebookConfig] +type accessIdentityProviderUpdateResponseResultAccessFacebookConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessFacebookConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessFacebookScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessFacebookScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessFacebookScimConfig] +type accessIdentityProviderUpdateResponseResultAccessFacebookScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessFacebookScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessFacebookType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessFacebookType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessFacebookType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeSaml AccessIdentityProviderUpdateResponseResultAccessFacebookType = "saml" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeCentrify AccessIdentityProviderUpdateResponseResultAccessFacebookType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeFacebook AccessIdentityProviderUpdateResponseResultAccessFacebookType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeGitHub AccessIdentityProviderUpdateResponseResultAccessFacebookType = "github" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessFacebookType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeGoogle AccessIdentityProviderUpdateResponseResultAccessFacebookType = "google" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessFacebookType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeOidc AccessIdentityProviderUpdateResponseResultAccessFacebookType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeOkta AccessIdentityProviderUpdateResponseResultAccessFacebookType = "okta" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessFacebookType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypePingone AccessIdentityProviderUpdateResponseResultAccessFacebookType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessFacebookTypeYandex AccessIdentityProviderUpdateResponseResultAccessFacebookType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessGitHub struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessGitHubConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessGitHubScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessGitHubType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessGitHubJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGitHubJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessGitHub] +type accessIdentityProviderUpdateResponseResultAccessGitHubJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessGitHub) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderUpdateResponseResultAccessGitHubConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGitHubConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGitHubConfig] +type accessIdentityProviderUpdateResponseResultAccessGitHubConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGitHubConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessGitHubScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGitHubScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGitHubScimConfig] +type accessIdentityProviderUpdateResponseResultAccessGitHubScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGitHubScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessGitHubType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessGitHubType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessGitHubType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeSaml AccessIdentityProviderUpdateResponseResultAccessGitHubType = "saml" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeCentrify AccessIdentityProviderUpdateResponseResultAccessGitHubType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeFacebook AccessIdentityProviderUpdateResponseResultAccessGitHubType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeGitHub AccessIdentityProviderUpdateResponseResultAccessGitHubType = "github" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessGitHubType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeGoogle AccessIdentityProviderUpdateResponseResultAccessGitHubType = "google" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessGitHubType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeOidc AccessIdentityProviderUpdateResponseResultAccessGitHubType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeOkta AccessIdentityProviderUpdateResponseResultAccessGitHubType = "okta" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessGitHubType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypePingone AccessIdentityProviderUpdateResponseResultAccessGitHubType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessGitHubTypeYandex AccessIdentityProviderUpdateResponseResultAccessGitHubType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessGoogle struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessGoogleConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessGoogleScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessGoogleType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessGoogle] +type accessIdentityProviderUpdateResponseResultAccessGoogleJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessGoogle) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessGoogleConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGoogleConfig] +type accessIdentityProviderUpdateResponseResultAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGoogleScimConfig] +type accessIdentityProviderUpdateResponseResultAccessGoogleScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogleScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessGoogleType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessGoogleType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessGoogleType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeSaml AccessIdentityProviderUpdateResponseResultAccessGoogleType = "saml" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeCentrify AccessIdentityProviderUpdateResponseResultAccessGoogleType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeFacebook AccessIdentityProviderUpdateResponseResultAccessGoogleType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeGitHub AccessIdentityProviderUpdateResponseResultAccessGoogleType = "github" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessGoogleType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeGoogle AccessIdentityProviderUpdateResponseResultAccessGoogleType = "google" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessGoogleType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeOidc AccessIdentityProviderUpdateResponseResultAccessGoogleType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeOkta AccessIdentityProviderUpdateResponseResultAccessGoogleType = "okta" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessGoogleType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypePingone AccessIdentityProviderUpdateResponseResultAccessGoogleType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessGoogleTypeYandex AccessIdentityProviderUpdateResponseResultAccessGoogleType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessGoogleApps struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessGoogleAppsConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleAppsJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleAppsJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGoogleApps] +type accessIdentityProviderUpdateResponseResultAccessGoogleAppsJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessGoogleApps) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain string `json:"apps_domain"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleAppsConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleAppsConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGoogleAppsConfig] +type accessIdentityProviderUpdateResponseResultAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfig] +type accessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessGoogleAppsScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeSaml AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "saml" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeCentrify AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeFacebook AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeGitHub AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "github" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeGoogle AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "google" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeOidc AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeOkta AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "okta" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypePingone AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessGoogleAppsTypeYandex AccessIdentityProviderUpdateResponseResultAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessLinkedin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessLinkedinConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessLinkedinScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessLinkedinType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessLinkedinJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessLinkedinJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessLinkedin] +type accessIdentityProviderUpdateResponseResultAccessLinkedinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessLinkedin) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderUpdateResponseResultAccessLinkedinConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessLinkedinConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessLinkedinConfig] +type accessIdentityProviderUpdateResponseResultAccessLinkedinConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessLinkedinConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessLinkedinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessLinkedinScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessLinkedinScimConfig] +type accessIdentityProviderUpdateResponseResultAccessLinkedinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessLinkedinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessLinkedinType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeSaml AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "saml" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeCentrify AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeFacebook AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeGitHub AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "github" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeGoogle AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "google" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeOidc AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeOkta AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "okta" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypePingone AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessLinkedinTypeYandex AccessIdentityProviderUpdateResponseResultAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessOidc struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessOidcConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessOidcScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessOidcType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessOidcJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOidcJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessOidc] +type accessIdentityProviderUpdateResponseResultAccessOidcJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOidc) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessOidc) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL string `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL string `json:"certs_url"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // OAuth scopes + Scopes []string `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL string `json:"token_url"` + JSON accessIdentityProviderUpdateResponseResultAccessOidcConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOidcConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOidcConfig] +type accessIdentityProviderUpdateResponseResultAccessOidcConfigJSON struct { + AuthURL apijson.Field + CertsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOidcConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessOidcScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOidcScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOidcScimConfig] +type accessIdentityProviderUpdateResponseResultAccessOidcScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOidcScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessOidcType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessOidcTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessOidcType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessOidcType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeSaml AccessIdentityProviderUpdateResponseResultAccessOidcType = "saml" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeCentrify AccessIdentityProviderUpdateResponseResultAccessOidcType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeFacebook AccessIdentityProviderUpdateResponseResultAccessOidcType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeGitHub AccessIdentityProviderUpdateResponseResultAccessOidcType = "github" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessOidcType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeGoogle AccessIdentityProviderUpdateResponseResultAccessOidcType = "google" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessOidcType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeOidc AccessIdentityProviderUpdateResponseResultAccessOidcType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeOkta AccessIdentityProviderUpdateResponseResultAccessOidcType = "okta" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessOidcType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessOidcTypePingone AccessIdentityProviderUpdateResponseResultAccessOidcType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessOidcTypeYandex AccessIdentityProviderUpdateResponseResultAccessOidcType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessOkta struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessOktaConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessOktaScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessOktaType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessOktaJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOktaJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessOkta] +type accessIdentityProviderUpdateResponseResultAccessOktaJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessOkta) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID string `json:"authorization_server_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your okta account url + OktaAccount string `json:"okta_account"` + JSON accessIdentityProviderUpdateResponseResultAccessOktaConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOktaConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOktaConfig] +type accessIdentityProviderUpdateResponseResultAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessOktaScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOktaScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOktaScimConfig] +type accessIdentityProviderUpdateResponseResultAccessOktaScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOktaScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessOktaType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessOktaTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessOktaType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessOktaType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeSaml AccessIdentityProviderUpdateResponseResultAccessOktaType = "saml" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeCentrify AccessIdentityProviderUpdateResponseResultAccessOktaType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeFacebook AccessIdentityProviderUpdateResponseResultAccessOktaType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeGitHub AccessIdentityProviderUpdateResponseResultAccessOktaType = "github" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessOktaType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeGoogle AccessIdentityProviderUpdateResponseResultAccessOktaType = "google" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessOktaType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeOidc AccessIdentityProviderUpdateResponseResultAccessOktaType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeOkta AccessIdentityProviderUpdateResponseResultAccessOktaType = "okta" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessOktaType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessOktaTypePingone AccessIdentityProviderUpdateResponseResultAccessOktaType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessOktaTypeYandex AccessIdentityProviderUpdateResponseResultAccessOktaType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessOnelogin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessOneloginConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessOneloginScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessOneloginType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessOneloginJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOneloginJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOnelogin] +type accessIdentityProviderUpdateResponseResultAccessOneloginJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessOnelogin) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessOneloginConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount string `json:"onelogin_account"` + JSON accessIdentityProviderUpdateResponseResultAccessOneloginConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOneloginConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOneloginConfig] +type accessIdentityProviderUpdateResponseResultAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessOneloginScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOneloginScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOneloginScimConfig] +type accessIdentityProviderUpdateResponseResultAccessOneloginScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOneloginScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessOneloginType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessOneloginType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessOneloginType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeSaml AccessIdentityProviderUpdateResponseResultAccessOneloginType = "saml" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeCentrify AccessIdentityProviderUpdateResponseResultAccessOneloginType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeFacebook AccessIdentityProviderUpdateResponseResultAccessOneloginType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeGitHub AccessIdentityProviderUpdateResponseResultAccessOneloginType = "github" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessOneloginType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeGoogle AccessIdentityProviderUpdateResponseResultAccessOneloginType = "google" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessOneloginType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeOidc AccessIdentityProviderUpdateResponseResultAccessOneloginType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeOkta AccessIdentityProviderUpdateResponseResultAccessOneloginType = "okta" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessOneloginType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypePingone AccessIdentityProviderUpdateResponseResultAccessOneloginType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessOneloginTypeYandex AccessIdentityProviderUpdateResponseResultAccessOneloginType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessPingone struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessPingoneConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessPingoneScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessPingoneType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessPingoneJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessPingoneJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessPingone] +type accessIdentityProviderUpdateResponseResultAccessPingoneJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessPingone) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessPingoneConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID string `json:"ping_env_id"` + JSON accessIdentityProviderUpdateResponseResultAccessPingoneConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessPingoneConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessPingoneConfig] +type accessIdentityProviderUpdateResponseResultAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessPingoneScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessPingoneScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessPingoneScimConfig] +type accessIdentityProviderUpdateResponseResultAccessPingoneScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessPingoneScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessPingoneType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessPingoneType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessPingoneType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeSaml AccessIdentityProviderUpdateResponseResultAccessPingoneType = "saml" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeCentrify AccessIdentityProviderUpdateResponseResultAccessPingoneType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeFacebook AccessIdentityProviderUpdateResponseResultAccessPingoneType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeGitHub AccessIdentityProviderUpdateResponseResultAccessPingoneType = "github" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessPingoneType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeGoogle AccessIdentityProviderUpdateResponseResultAccessPingoneType = "google" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessPingoneType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeOidc AccessIdentityProviderUpdateResponseResultAccessPingoneType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeOkta AccessIdentityProviderUpdateResponseResultAccessPingoneType = "okta" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessPingoneType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypePingone AccessIdentityProviderUpdateResponseResultAccessPingoneType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessPingoneTypeYandex AccessIdentityProviderUpdateResponseResultAccessPingoneType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessSaml struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessSamlConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessSamlScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessSamlType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessSamlJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessSamlJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessSaml] +type accessIdentityProviderUpdateResponseResultAccessSamlJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessSaml) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes []string `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName string `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes []AccessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttribute `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + 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 + // signature, use the public key from the Access certs endpoints. + SignRequest bool `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL string `json:"sso_target_url"` + JSON accessIdentityProviderUpdateResponseResultAccessSamlConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessSamlConfigJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessSamlConfig] +type accessIdentityProviderUpdateResponseResultAccessSamlConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdpPublicCerts apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessSamlConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName string `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName string `json:"header_name"` + JSON accessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttributeJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttributeJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttribute] +type accessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessSamlConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessSamlScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessSamlScimConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessSamlScimConfig] +type accessIdentityProviderUpdateResponseResultAccessSamlScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessSamlScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessSamlType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessSamlTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessSamlType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessSamlType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeSaml AccessIdentityProviderUpdateResponseResultAccessSamlType = "saml" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeCentrify AccessIdentityProviderUpdateResponseResultAccessSamlType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeFacebook AccessIdentityProviderUpdateResponseResultAccessSamlType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeGitHub AccessIdentityProviderUpdateResponseResultAccessSamlType = "github" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessSamlType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeGoogle AccessIdentityProviderUpdateResponseResultAccessSamlType = "google" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessSamlType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeOidc AccessIdentityProviderUpdateResponseResultAccessSamlType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeOkta AccessIdentityProviderUpdateResponseResultAccessSamlType = "okta" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessSamlType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessSamlTypePingone AccessIdentityProviderUpdateResponseResultAccessSamlType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessSamlTypeYandex AccessIdentityProviderUpdateResponseResultAccessSamlType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessYandex struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderUpdateResponseResultAccessYandexConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessYandexScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderUpdateResponseResultAccessYandexType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessYandexJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessYandexJSON contains the JSON +// metadata for the struct [AccessIdentityProviderUpdateResponseResultAccessYandex] +type accessIdentityProviderUpdateResponseResultAccessYandexJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessYandex) implementsAccessIdentityProviderUpdateResponseResult() { +} + +type AccessIdentityProviderUpdateResponseResultAccessYandexConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderUpdateResponseResultAccessYandexConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessYandexConfigJSON contains the +// JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessYandexConfig] +type accessIdentityProviderUpdateResponseResultAccessYandexConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessYandexConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessYandexScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessYandexScimConfigJSON contains +// the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessYandexScimConfig] +type accessIdentityProviderUpdateResponseResultAccessYandexScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessYandexScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateResponseResultAccessYandexType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessYandexTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessYandexType = "onetimepin" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeAzureAd AccessIdentityProviderUpdateResponseResultAccessYandexType = "azureAD" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeSaml AccessIdentityProviderUpdateResponseResultAccessYandexType = "saml" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeCentrify AccessIdentityProviderUpdateResponseResultAccessYandexType = "centrify" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeFacebook AccessIdentityProviderUpdateResponseResultAccessYandexType = "facebook" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeGitHub AccessIdentityProviderUpdateResponseResultAccessYandexType = "github" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeGoogleApps AccessIdentityProviderUpdateResponseResultAccessYandexType = "google-apps" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeGoogle AccessIdentityProviderUpdateResponseResultAccessYandexType = "google" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeLinkedin AccessIdentityProviderUpdateResponseResultAccessYandexType = "linkedin" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeOidc AccessIdentityProviderUpdateResponseResultAccessYandexType = "oidc" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeOkta AccessIdentityProviderUpdateResponseResultAccessYandexType = "okta" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeOnelogin AccessIdentityProviderUpdateResponseResultAccessYandexType = "onelogin" + AccessIdentityProviderUpdateResponseResultAccessYandexTypePingone AccessIdentityProviderUpdateResponseResultAccessYandexType = "pingone" + AccessIdentityProviderUpdateResponseResultAccessYandexTypeYandex AccessIdentityProviderUpdateResponseResultAccessYandexType = "yandex" +) + +type AccessIdentityProviderUpdateResponseResultAccessOnetimepin struct { + // UUID + ID string `json:"id"` + Config interface{} `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfig `json:"scim_config"` + Type AccessIdentityProviderUpdateResponseResultAccessOnetimepinType `json:"type"` + JSON accessIdentityProviderUpdateResponseResultAccessOnetimepinJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOnetimepinJSON contains the JSON +// metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOnetimepin] +type accessIdentityProviderUpdateResponseResultAccessOnetimepinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderUpdateResponseResultAccessOnetimepin) implementsAccessIdentityProviderUpdateResponseResult() { +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfig] +type accessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderUpdateResponseResultAccessOnetimepinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderUpdateResponseResultAccessOnetimepinType string + +const ( + AccessIdentityProviderUpdateResponseResultAccessOnetimepinTypeOnetimepin AccessIdentityProviderUpdateResponseResultAccessOnetimepinType = "onetimepin" +) + +// Whether the API call was successful +type AccessIdentityProviderUpdateResponseSuccess bool + +const ( + AccessIdentityProviderUpdateResponseSuccessTrue AccessIdentityProviderUpdateResponseSuccess = true +) + +type AccessIdentityProviderDeleteResponse struct { + Errors []AccessIdentityProviderDeleteResponseError `json:"errors"` + Messages []AccessIdentityProviderDeleteResponseMessage `json:"messages"` + Result AccessIdentityProviderDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessIdentityProviderDeleteResponseSuccess `json:"success"` + JSON accessIdentityProviderDeleteResponseJSON `json:"-"` +} + +// accessIdentityProviderDeleteResponseJSON contains the JSON metadata for the +// struct [AccessIdentityProviderDeleteResponse] +type accessIdentityProviderDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderDeleteResponseErrorJSON `json:"-"` +} + +// accessIdentityProviderDeleteResponseErrorJSON contains the JSON metadata for the +// struct [AccessIdentityProviderDeleteResponseError] +type accessIdentityProviderDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderDeleteResponseMessageJSON `json:"-"` +} + +// accessIdentityProviderDeleteResponseMessageJSON contains the JSON metadata for +// the struct [AccessIdentityProviderDeleteResponseMessage] +type accessIdentityProviderDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderDeleteResponseResult struct { + // UUID + ID string `json:"id"` + JSON accessIdentityProviderDeleteResponseResultJSON `json:"-"` +} + +// accessIdentityProviderDeleteResponseResultJSON contains the JSON metadata for +// the struct [AccessIdentityProviderDeleteResponseResult] +type accessIdentityProviderDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessIdentityProviderDeleteResponseSuccess bool + +const ( + AccessIdentityProviderDeleteResponseSuccessTrue AccessIdentityProviderDeleteResponseSuccess = true +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse struct { + Errors []AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseError `json:"errors"` + Messages []AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessage `json:"messages"` + Result AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult `json:"result"` + // Whether the API call was successful + Success AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseSuccess `json:"success"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseErrorJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseError] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessageJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessage] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAd], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrify], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebook], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHub], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogle], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleApps], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedin], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidc], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOkta], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnelogin], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingone], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSaml], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandex] +// or +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepin]. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult interface { + implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult)(nil)).Elem(), "") +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAd struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAd] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAd) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled bool `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID string `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups bool `json:"support_groups"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + ConditionalAccessEnabled apijson.Field + DirectoryID apijson.Field + EmailClaimName apijson.Field + SupportGroups apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrify struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrify] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrify) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrify) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount string `json:"centrify_account"` + // Your centrify app id + CentrifyAppID string `json:"centrify_app_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebook struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebook] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebook) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessFacebookType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHub struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHub] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHub) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGitHubType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogle struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogle] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogle) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleApps struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleApps] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleApps) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain string `json:"apps_domain"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedin] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedin) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidc struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidc] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidc) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidc) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL string `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL string `json:"certs_url"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // OAuth scopes + Scopes []string `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL string `json:"token_url"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfigJSON struct { + AuthURL apijson.Field + CertsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOidcType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOkta struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOkta] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOkta) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID string `json:"authorization_server_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your okta account url + OktaAccount string `json:"okta_account"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOktaType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnelogin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnelogin] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnelogin) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount string `json:"onelogin_account"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOneloginType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingone struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingone] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingone) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID string `json:"ping_env_id"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessPingoneType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSaml struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSaml] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSaml) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes []string `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName string `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes []AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttribute `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + 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 + // signature, use the public key from the Access certs endpoints. + SignRequest bool `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL string `json:"sso_target_url"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdpPublicCerts apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName string `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName string `json:"header_name"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttributeJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttributeJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttribute] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessSamlType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandex struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandex] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandex) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessYandexType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepin struct { + // UUID + ID string `json:"id"` + Config interface{} `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfig `json:"scim_config"` + Type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepin] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepin) implementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResult() { +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfig] +type accessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseResultAccessOnetimepinType = "onetimepin" +) + +// Whether the API call was successful +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseSuccess bool + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseSuccessTrue AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponseSuccess = true +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse struct { + Errors []AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseError `json:"errors"` + Messages []AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessage `json:"messages"` + Result []AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult `json:"result"` + ResultInfo AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseSuccess `json:"success"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseErrorJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseError] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessageJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessage] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAd], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrify], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebook], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHub], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogle], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleApps], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedin], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidc], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOkta], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOnelogin], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingone], +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSaml] +// or +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandex]. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult interface { + implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult)(nil)).Elem(), "") +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAd struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAd] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAd) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAd) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled bool `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID string `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups bool `json:"support_groups"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + ConditionalAccessEnabled apijson.Field + DirectoryID apijson.Field + EmailClaimName apijson.Field + SupportGroups apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrify struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrify] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrify) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrify) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount string `json:"centrify_account"` + // Your centrify app id + CentrifyAppID string `json:"centrify_app_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebook struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebook] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebook) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessFacebookType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHub struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHub] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHub) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGitHubType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogle struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogle] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogle) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleApps struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleApps] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleApps) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain string `json:"apps_domain"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedin] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedin) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidc struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidc] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidc) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidc) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL string `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL string `json:"certs_url"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // OAuth scopes + Scopes []string `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL string `json:"token_url"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfigJSON struct { + AuthURL apijson.Field + CertsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOidcType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOkta struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOkta] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOkta) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID string `json:"authorization_server_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your okta account url + OktaAccount string `json:"okta_account"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOktaType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOnelogin struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOnelogin] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOnelogin) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount string `json:"onelogin_account"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessOneloginType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingone struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingone] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingone) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID string `json:"ping_env_id"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessPingoneType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSaml struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSaml] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSaml) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSaml) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes []string `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName string `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes []AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttribute `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + 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 + // signature, use the public key from the Access certs endpoints. + SignRequest bool `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL string `json:"sso_target_url"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdpPublicCerts apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName string `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName string `json:"header_name"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttributeJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttributeJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttribute] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessSamlType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandex struct { + // UUID + ID string `json:"id"` + Config AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfig `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType `json:"type"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandex] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexJSON struct { + ID apijson.Field + Config apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandex) implementsAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResult() { +} + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfig struct { + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfigJSON struct { + ClientID apijson.Field + ClientSecret apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfigJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfigJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfig] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType string + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeAzureAd AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeSaml AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "saml" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeCentrify AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "centrify" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeFacebook AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "facebook" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeGitHub AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "github" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeGoogle AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "google" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeLinkedin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeOidc AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "oidc" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeOkta AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "okta" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeOnelogin AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypePingone AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "pingone" + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexTypeYandex AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultAccessYandexType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfoJSON `json:"-"` +} + +// accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfo] +type accessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseSuccess bool + +const ( + AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseSuccessTrue AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponseSuccess = true +) + +// This interface is a union satisfied by one of the following: +// [AccessIdentityProviderUpdateParamsAccessAzureAd], +// [AccessIdentityProviderUpdateParamsAccessCentrify], +// [AccessIdentityProviderUpdateParamsAccessFacebook], +// [AccessIdentityProviderUpdateParamsAccessGitHub], +// [AccessIdentityProviderUpdateParamsAccessGoogle], +// [AccessIdentityProviderUpdateParamsAccessGoogleApps], +// [AccessIdentityProviderUpdateParamsAccessLinkedin], +// [AccessIdentityProviderUpdateParamsAccessOidc], +// [AccessIdentityProviderUpdateParamsAccessOkta], +// [AccessIdentityProviderUpdateParamsAccessOnelogin], +// [AccessIdentityProviderUpdateParamsAccessPingone], +// [AccessIdentityProviderUpdateParamsAccessSaml], +// [AccessIdentityProviderUpdateParamsAccessYandex], +// [AccessIdentityProviderUpdateParamsAccessOnetimepin]. +type AccessIdentityProviderUpdateParams interface { + ImplementsAccessIdentityProviderUpdateParams() +} + +type AccessIdentityProviderUpdateParamsAccessAzureAd struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessAzureAdConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessAzureAdScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessAzureAdType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessAzureAd) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessAzureAdConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled param.Field[bool] `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID param.Field[string] `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups param.Field[bool] `json:"support_groups"` +} + +func (r AccessIdentityProviderUpdateParamsAccessAzureAdConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessAzureAdScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessAzureAdType string + +const ( + AccessIdentityProviderUpdateParamsAccessAzureAdTypeOnetimepin AccessIdentityProviderUpdateParamsAccessAzureAdType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeAzureAd AccessIdentityProviderUpdateParamsAccessAzureAdType = "azureAD" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeSaml AccessIdentityProviderUpdateParamsAccessAzureAdType = "saml" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeCentrify AccessIdentityProviderUpdateParamsAccessAzureAdType = "centrify" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeFacebook AccessIdentityProviderUpdateParamsAccessAzureAdType = "facebook" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeGitHub AccessIdentityProviderUpdateParamsAccessAzureAdType = "github" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeGoogleApps AccessIdentityProviderUpdateParamsAccessAzureAdType = "google-apps" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeGoogle AccessIdentityProviderUpdateParamsAccessAzureAdType = "google" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeLinkedin AccessIdentityProviderUpdateParamsAccessAzureAdType = "linkedin" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeOidc AccessIdentityProviderUpdateParamsAccessAzureAdType = "oidc" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeOkta AccessIdentityProviderUpdateParamsAccessAzureAdType = "okta" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeOnelogin AccessIdentityProviderUpdateParamsAccessAzureAdType = "onelogin" + AccessIdentityProviderUpdateParamsAccessAzureAdTypePingone AccessIdentityProviderUpdateParamsAccessAzureAdType = "pingone" + AccessIdentityProviderUpdateParamsAccessAzureAdTypeYandex AccessIdentityProviderUpdateParamsAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessCentrify struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessCentrifyConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessCentrifyScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessCentrifyType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessCentrify) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessCentrify) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount param.Field[string] `json:"centrify_account"` + // Your centrify app id + CentrifyAppID param.Field[string] `json:"centrify_app_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderUpdateParamsAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessCentrifyScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessCentrifyType string + +const ( + AccessIdentityProviderUpdateParamsAccessCentrifyTypeOnetimepin AccessIdentityProviderUpdateParamsAccessCentrifyType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeAzureAd AccessIdentityProviderUpdateParamsAccessCentrifyType = "azureAD" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeSaml AccessIdentityProviderUpdateParamsAccessCentrifyType = "saml" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeCentrify AccessIdentityProviderUpdateParamsAccessCentrifyType = "centrify" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeFacebook AccessIdentityProviderUpdateParamsAccessCentrifyType = "facebook" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeGitHub AccessIdentityProviderUpdateParamsAccessCentrifyType = "github" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeGoogleApps AccessIdentityProviderUpdateParamsAccessCentrifyType = "google-apps" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeGoogle AccessIdentityProviderUpdateParamsAccessCentrifyType = "google" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeLinkedin AccessIdentityProviderUpdateParamsAccessCentrifyType = "linkedin" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeOidc AccessIdentityProviderUpdateParamsAccessCentrifyType = "oidc" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeOkta AccessIdentityProviderUpdateParamsAccessCentrifyType = "okta" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeOnelogin AccessIdentityProviderUpdateParamsAccessCentrifyType = "onelogin" + AccessIdentityProviderUpdateParamsAccessCentrifyTypePingone AccessIdentityProviderUpdateParamsAccessCentrifyType = "pingone" + AccessIdentityProviderUpdateParamsAccessCentrifyTypeYandex AccessIdentityProviderUpdateParamsAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessFacebook struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessFacebookConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessFacebookScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessFacebookType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessFacebook) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessFacebook) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderUpdateParamsAccessFacebookConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessFacebookScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessFacebookType string + +const ( + AccessIdentityProviderUpdateParamsAccessFacebookTypeOnetimepin AccessIdentityProviderUpdateParamsAccessFacebookType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessFacebookTypeAzureAd AccessIdentityProviderUpdateParamsAccessFacebookType = "azureAD" + AccessIdentityProviderUpdateParamsAccessFacebookTypeSaml AccessIdentityProviderUpdateParamsAccessFacebookType = "saml" + AccessIdentityProviderUpdateParamsAccessFacebookTypeCentrify AccessIdentityProviderUpdateParamsAccessFacebookType = "centrify" + AccessIdentityProviderUpdateParamsAccessFacebookTypeFacebook AccessIdentityProviderUpdateParamsAccessFacebookType = "facebook" + AccessIdentityProviderUpdateParamsAccessFacebookTypeGitHub AccessIdentityProviderUpdateParamsAccessFacebookType = "github" + AccessIdentityProviderUpdateParamsAccessFacebookTypeGoogleApps AccessIdentityProviderUpdateParamsAccessFacebookType = "google-apps" + AccessIdentityProviderUpdateParamsAccessFacebookTypeGoogle AccessIdentityProviderUpdateParamsAccessFacebookType = "google" + AccessIdentityProviderUpdateParamsAccessFacebookTypeLinkedin AccessIdentityProviderUpdateParamsAccessFacebookType = "linkedin" + AccessIdentityProviderUpdateParamsAccessFacebookTypeOidc AccessIdentityProviderUpdateParamsAccessFacebookType = "oidc" + AccessIdentityProviderUpdateParamsAccessFacebookTypeOkta AccessIdentityProviderUpdateParamsAccessFacebookType = "okta" + AccessIdentityProviderUpdateParamsAccessFacebookTypeOnelogin AccessIdentityProviderUpdateParamsAccessFacebookType = "onelogin" + AccessIdentityProviderUpdateParamsAccessFacebookTypePingone AccessIdentityProviderUpdateParamsAccessFacebookType = "pingone" + AccessIdentityProviderUpdateParamsAccessFacebookTypeYandex AccessIdentityProviderUpdateParamsAccessFacebookType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessGitHub struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessGitHubConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessGitHubScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessGitHubType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGitHub) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessGitHub) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGitHubConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGitHubScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessGitHubType string + +const ( + AccessIdentityProviderUpdateParamsAccessGitHubTypeOnetimepin AccessIdentityProviderUpdateParamsAccessGitHubType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessGitHubTypeAzureAd AccessIdentityProviderUpdateParamsAccessGitHubType = "azureAD" + AccessIdentityProviderUpdateParamsAccessGitHubTypeSaml AccessIdentityProviderUpdateParamsAccessGitHubType = "saml" + AccessIdentityProviderUpdateParamsAccessGitHubTypeCentrify AccessIdentityProviderUpdateParamsAccessGitHubType = "centrify" + AccessIdentityProviderUpdateParamsAccessGitHubTypeFacebook AccessIdentityProviderUpdateParamsAccessGitHubType = "facebook" + AccessIdentityProviderUpdateParamsAccessGitHubTypeGitHub AccessIdentityProviderUpdateParamsAccessGitHubType = "github" + AccessIdentityProviderUpdateParamsAccessGitHubTypeGoogleApps AccessIdentityProviderUpdateParamsAccessGitHubType = "google-apps" + AccessIdentityProviderUpdateParamsAccessGitHubTypeGoogle AccessIdentityProviderUpdateParamsAccessGitHubType = "google" + AccessIdentityProviderUpdateParamsAccessGitHubTypeLinkedin AccessIdentityProviderUpdateParamsAccessGitHubType = "linkedin" + AccessIdentityProviderUpdateParamsAccessGitHubTypeOidc AccessIdentityProviderUpdateParamsAccessGitHubType = "oidc" + AccessIdentityProviderUpdateParamsAccessGitHubTypeOkta AccessIdentityProviderUpdateParamsAccessGitHubType = "okta" + AccessIdentityProviderUpdateParamsAccessGitHubTypeOnelogin AccessIdentityProviderUpdateParamsAccessGitHubType = "onelogin" + AccessIdentityProviderUpdateParamsAccessGitHubTypePingone AccessIdentityProviderUpdateParamsAccessGitHubType = "pingone" + AccessIdentityProviderUpdateParamsAccessGitHubTypeYandex AccessIdentityProviderUpdateParamsAccessGitHubType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessGoogle struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessGoogleConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessGoogleScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessGoogleType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogle) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessGoogle) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessGoogleConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogleConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogleScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessGoogleType string + +const ( + AccessIdentityProviderUpdateParamsAccessGoogleTypeOnetimepin AccessIdentityProviderUpdateParamsAccessGoogleType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessGoogleTypeAzureAd AccessIdentityProviderUpdateParamsAccessGoogleType = "azureAD" + AccessIdentityProviderUpdateParamsAccessGoogleTypeSaml AccessIdentityProviderUpdateParamsAccessGoogleType = "saml" + AccessIdentityProviderUpdateParamsAccessGoogleTypeCentrify AccessIdentityProviderUpdateParamsAccessGoogleType = "centrify" + AccessIdentityProviderUpdateParamsAccessGoogleTypeFacebook AccessIdentityProviderUpdateParamsAccessGoogleType = "facebook" + AccessIdentityProviderUpdateParamsAccessGoogleTypeGitHub AccessIdentityProviderUpdateParamsAccessGoogleType = "github" + AccessIdentityProviderUpdateParamsAccessGoogleTypeGoogleApps AccessIdentityProviderUpdateParamsAccessGoogleType = "google-apps" + AccessIdentityProviderUpdateParamsAccessGoogleTypeGoogle AccessIdentityProviderUpdateParamsAccessGoogleType = "google" + AccessIdentityProviderUpdateParamsAccessGoogleTypeLinkedin AccessIdentityProviderUpdateParamsAccessGoogleType = "linkedin" + AccessIdentityProviderUpdateParamsAccessGoogleTypeOidc AccessIdentityProviderUpdateParamsAccessGoogleType = "oidc" + AccessIdentityProviderUpdateParamsAccessGoogleTypeOkta AccessIdentityProviderUpdateParamsAccessGoogleType = "okta" + AccessIdentityProviderUpdateParamsAccessGoogleTypeOnelogin AccessIdentityProviderUpdateParamsAccessGoogleType = "onelogin" + AccessIdentityProviderUpdateParamsAccessGoogleTypePingone AccessIdentityProviderUpdateParamsAccessGoogleType = "pingone" + AccessIdentityProviderUpdateParamsAccessGoogleTypeYandex AccessIdentityProviderUpdateParamsAccessGoogleType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessGoogleApps struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessGoogleAppsConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessGoogleAppsScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessGoogleAppsType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogleApps) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessGoogleApps) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain param.Field[string] `json:"apps_domain"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessGoogleAppsScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessGoogleAppsType string + +const ( + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeOnetimepin AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeAzureAd AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "azureAD" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeSaml AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "saml" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeCentrify AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "centrify" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeFacebook AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "facebook" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeGitHub AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "github" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeGoogleApps AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "google-apps" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeGoogle AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "google" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeLinkedin AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "linkedin" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeOidc AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "oidc" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeOkta AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "okta" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeOnelogin AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "onelogin" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypePingone AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "pingone" + AccessIdentityProviderUpdateParamsAccessGoogleAppsTypeYandex AccessIdentityProviderUpdateParamsAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessLinkedin struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessLinkedinConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessLinkedinScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessLinkedinType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessLinkedin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessLinkedin) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderUpdateParamsAccessLinkedinConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessLinkedinScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessLinkedinType string + +const ( + AccessIdentityProviderUpdateParamsAccessLinkedinTypeOnetimepin AccessIdentityProviderUpdateParamsAccessLinkedinType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeAzureAd AccessIdentityProviderUpdateParamsAccessLinkedinType = "azureAD" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeSaml AccessIdentityProviderUpdateParamsAccessLinkedinType = "saml" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeCentrify AccessIdentityProviderUpdateParamsAccessLinkedinType = "centrify" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeFacebook AccessIdentityProviderUpdateParamsAccessLinkedinType = "facebook" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeGitHub AccessIdentityProviderUpdateParamsAccessLinkedinType = "github" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeGoogleApps AccessIdentityProviderUpdateParamsAccessLinkedinType = "google-apps" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeGoogle AccessIdentityProviderUpdateParamsAccessLinkedinType = "google" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeLinkedin AccessIdentityProviderUpdateParamsAccessLinkedinType = "linkedin" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeOidc AccessIdentityProviderUpdateParamsAccessLinkedinType = "oidc" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeOkta AccessIdentityProviderUpdateParamsAccessLinkedinType = "okta" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeOnelogin AccessIdentityProviderUpdateParamsAccessLinkedinType = "onelogin" + AccessIdentityProviderUpdateParamsAccessLinkedinTypePingone AccessIdentityProviderUpdateParamsAccessLinkedinType = "pingone" + AccessIdentityProviderUpdateParamsAccessLinkedinTypeYandex AccessIdentityProviderUpdateParamsAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessOidc struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessOidcConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessOidcScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessOidcType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOidc) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessOidc) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL param.Field[string] `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL param.Field[string] `json:"certs_url"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // OAuth scopes + Scopes param.Field[[]string] `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL param.Field[string] `json:"token_url"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOidcConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOidcScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessOidcType string + +const ( + AccessIdentityProviderUpdateParamsAccessOidcTypeOnetimepin AccessIdentityProviderUpdateParamsAccessOidcType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessOidcTypeAzureAd AccessIdentityProviderUpdateParamsAccessOidcType = "azureAD" + AccessIdentityProviderUpdateParamsAccessOidcTypeSaml AccessIdentityProviderUpdateParamsAccessOidcType = "saml" + AccessIdentityProviderUpdateParamsAccessOidcTypeCentrify AccessIdentityProviderUpdateParamsAccessOidcType = "centrify" + AccessIdentityProviderUpdateParamsAccessOidcTypeFacebook AccessIdentityProviderUpdateParamsAccessOidcType = "facebook" + AccessIdentityProviderUpdateParamsAccessOidcTypeGitHub AccessIdentityProviderUpdateParamsAccessOidcType = "github" + AccessIdentityProviderUpdateParamsAccessOidcTypeGoogleApps AccessIdentityProviderUpdateParamsAccessOidcType = "google-apps" + AccessIdentityProviderUpdateParamsAccessOidcTypeGoogle AccessIdentityProviderUpdateParamsAccessOidcType = "google" + AccessIdentityProviderUpdateParamsAccessOidcTypeLinkedin AccessIdentityProviderUpdateParamsAccessOidcType = "linkedin" + AccessIdentityProviderUpdateParamsAccessOidcTypeOidc AccessIdentityProviderUpdateParamsAccessOidcType = "oidc" + AccessIdentityProviderUpdateParamsAccessOidcTypeOkta AccessIdentityProviderUpdateParamsAccessOidcType = "okta" + AccessIdentityProviderUpdateParamsAccessOidcTypeOnelogin AccessIdentityProviderUpdateParamsAccessOidcType = "onelogin" + AccessIdentityProviderUpdateParamsAccessOidcTypePingone AccessIdentityProviderUpdateParamsAccessOidcType = "pingone" + AccessIdentityProviderUpdateParamsAccessOidcTypeYandex AccessIdentityProviderUpdateParamsAccessOidcType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessOkta struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessOktaConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessOktaScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessOktaType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessOkta) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID param.Field[string] `json:"authorization_server_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your okta account url + OktaAccount param.Field[string] `json:"okta_account"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOktaConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOktaScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessOktaType string + +const ( + AccessIdentityProviderUpdateParamsAccessOktaTypeOnetimepin AccessIdentityProviderUpdateParamsAccessOktaType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessOktaTypeAzureAd AccessIdentityProviderUpdateParamsAccessOktaType = "azureAD" + AccessIdentityProviderUpdateParamsAccessOktaTypeSaml AccessIdentityProviderUpdateParamsAccessOktaType = "saml" + AccessIdentityProviderUpdateParamsAccessOktaTypeCentrify AccessIdentityProviderUpdateParamsAccessOktaType = "centrify" + AccessIdentityProviderUpdateParamsAccessOktaTypeFacebook AccessIdentityProviderUpdateParamsAccessOktaType = "facebook" + AccessIdentityProviderUpdateParamsAccessOktaTypeGitHub AccessIdentityProviderUpdateParamsAccessOktaType = "github" + AccessIdentityProviderUpdateParamsAccessOktaTypeGoogleApps AccessIdentityProviderUpdateParamsAccessOktaType = "google-apps" + AccessIdentityProviderUpdateParamsAccessOktaTypeGoogle AccessIdentityProviderUpdateParamsAccessOktaType = "google" + AccessIdentityProviderUpdateParamsAccessOktaTypeLinkedin AccessIdentityProviderUpdateParamsAccessOktaType = "linkedin" + AccessIdentityProviderUpdateParamsAccessOktaTypeOidc AccessIdentityProviderUpdateParamsAccessOktaType = "oidc" + AccessIdentityProviderUpdateParamsAccessOktaTypeOkta AccessIdentityProviderUpdateParamsAccessOktaType = "okta" + AccessIdentityProviderUpdateParamsAccessOktaTypeOnelogin AccessIdentityProviderUpdateParamsAccessOktaType = "onelogin" + AccessIdentityProviderUpdateParamsAccessOktaTypePingone AccessIdentityProviderUpdateParamsAccessOktaType = "pingone" + AccessIdentityProviderUpdateParamsAccessOktaTypeYandex AccessIdentityProviderUpdateParamsAccessOktaType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessOnelogin struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessOneloginConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessOneloginScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessOneloginType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOnelogin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessOnelogin) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessOneloginConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount param.Field[string] `json:"onelogin_account"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOneloginConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOneloginScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessOneloginType string + +const ( + AccessIdentityProviderUpdateParamsAccessOneloginTypeOnetimepin AccessIdentityProviderUpdateParamsAccessOneloginType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessOneloginTypeAzureAd AccessIdentityProviderUpdateParamsAccessOneloginType = "azureAD" + AccessIdentityProviderUpdateParamsAccessOneloginTypeSaml AccessIdentityProviderUpdateParamsAccessOneloginType = "saml" + AccessIdentityProviderUpdateParamsAccessOneloginTypeCentrify AccessIdentityProviderUpdateParamsAccessOneloginType = "centrify" + AccessIdentityProviderUpdateParamsAccessOneloginTypeFacebook AccessIdentityProviderUpdateParamsAccessOneloginType = "facebook" + AccessIdentityProviderUpdateParamsAccessOneloginTypeGitHub AccessIdentityProviderUpdateParamsAccessOneloginType = "github" + AccessIdentityProviderUpdateParamsAccessOneloginTypeGoogleApps AccessIdentityProviderUpdateParamsAccessOneloginType = "google-apps" + AccessIdentityProviderUpdateParamsAccessOneloginTypeGoogle AccessIdentityProviderUpdateParamsAccessOneloginType = "google" + AccessIdentityProviderUpdateParamsAccessOneloginTypeLinkedin AccessIdentityProviderUpdateParamsAccessOneloginType = "linkedin" + AccessIdentityProviderUpdateParamsAccessOneloginTypeOidc AccessIdentityProviderUpdateParamsAccessOneloginType = "oidc" + AccessIdentityProviderUpdateParamsAccessOneloginTypeOkta AccessIdentityProviderUpdateParamsAccessOneloginType = "okta" + AccessIdentityProviderUpdateParamsAccessOneloginTypeOnelogin AccessIdentityProviderUpdateParamsAccessOneloginType = "onelogin" + AccessIdentityProviderUpdateParamsAccessOneloginTypePingone AccessIdentityProviderUpdateParamsAccessOneloginType = "pingone" + AccessIdentityProviderUpdateParamsAccessOneloginTypeYandex AccessIdentityProviderUpdateParamsAccessOneloginType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessPingone struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessPingoneConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessPingoneScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessPingoneType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessPingone) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessPingone) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessPingoneConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID param.Field[string] `json:"ping_env_id"` +} + +func (r AccessIdentityProviderUpdateParamsAccessPingoneConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessPingoneScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessPingoneType string + +const ( + AccessIdentityProviderUpdateParamsAccessPingoneTypeOnetimepin AccessIdentityProviderUpdateParamsAccessPingoneType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessPingoneTypeAzureAd AccessIdentityProviderUpdateParamsAccessPingoneType = "azureAD" + AccessIdentityProviderUpdateParamsAccessPingoneTypeSaml AccessIdentityProviderUpdateParamsAccessPingoneType = "saml" + AccessIdentityProviderUpdateParamsAccessPingoneTypeCentrify AccessIdentityProviderUpdateParamsAccessPingoneType = "centrify" + AccessIdentityProviderUpdateParamsAccessPingoneTypeFacebook AccessIdentityProviderUpdateParamsAccessPingoneType = "facebook" + AccessIdentityProviderUpdateParamsAccessPingoneTypeGitHub AccessIdentityProviderUpdateParamsAccessPingoneType = "github" + AccessIdentityProviderUpdateParamsAccessPingoneTypeGoogleApps AccessIdentityProviderUpdateParamsAccessPingoneType = "google-apps" + AccessIdentityProviderUpdateParamsAccessPingoneTypeGoogle AccessIdentityProviderUpdateParamsAccessPingoneType = "google" + AccessIdentityProviderUpdateParamsAccessPingoneTypeLinkedin AccessIdentityProviderUpdateParamsAccessPingoneType = "linkedin" + AccessIdentityProviderUpdateParamsAccessPingoneTypeOidc AccessIdentityProviderUpdateParamsAccessPingoneType = "oidc" + AccessIdentityProviderUpdateParamsAccessPingoneTypeOkta AccessIdentityProviderUpdateParamsAccessPingoneType = "okta" + AccessIdentityProviderUpdateParamsAccessPingoneTypeOnelogin AccessIdentityProviderUpdateParamsAccessPingoneType = "onelogin" + AccessIdentityProviderUpdateParamsAccessPingoneTypePingone AccessIdentityProviderUpdateParamsAccessPingoneType = "pingone" + AccessIdentityProviderUpdateParamsAccessPingoneTypeYandex AccessIdentityProviderUpdateParamsAccessPingoneType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessSaml struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessSamlConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessSamlScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessSamlType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessSaml) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes param.Field[[]string] `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName param.Field[string] `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes param.Field[[]AccessIdentityProviderUpdateParamsAccessSamlConfigHeaderAttribute] `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + IdpPublicCerts param.Field[[]string] `json:"idp_public_certs"` + // IdP Entity ID or Issuer URL + IssuerURL param.Field[string] `json:"issuer_url"` + // Sign the SAML authentication request with Access credentials. To verify the + // signature, use the public key from the Access certs endpoints. + SignRequest param.Field[bool] `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL param.Field[string] `json:"sso_target_url"` +} + +func (r AccessIdentityProviderUpdateParamsAccessSamlConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessIdentityProviderUpdateParamsAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName param.Field[string] `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName param.Field[string] `json:"header_name"` +} + +func (r AccessIdentityProviderUpdateParamsAccessSamlConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessSamlScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessSamlType string + +const ( + AccessIdentityProviderUpdateParamsAccessSamlTypeOnetimepin AccessIdentityProviderUpdateParamsAccessSamlType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessSamlTypeAzureAd AccessIdentityProviderUpdateParamsAccessSamlType = "azureAD" + AccessIdentityProviderUpdateParamsAccessSamlTypeSaml AccessIdentityProviderUpdateParamsAccessSamlType = "saml" + AccessIdentityProviderUpdateParamsAccessSamlTypeCentrify AccessIdentityProviderUpdateParamsAccessSamlType = "centrify" + AccessIdentityProviderUpdateParamsAccessSamlTypeFacebook AccessIdentityProviderUpdateParamsAccessSamlType = "facebook" + AccessIdentityProviderUpdateParamsAccessSamlTypeGitHub AccessIdentityProviderUpdateParamsAccessSamlType = "github" + AccessIdentityProviderUpdateParamsAccessSamlTypeGoogleApps AccessIdentityProviderUpdateParamsAccessSamlType = "google-apps" + AccessIdentityProviderUpdateParamsAccessSamlTypeGoogle AccessIdentityProviderUpdateParamsAccessSamlType = "google" + AccessIdentityProviderUpdateParamsAccessSamlTypeLinkedin AccessIdentityProviderUpdateParamsAccessSamlType = "linkedin" + AccessIdentityProviderUpdateParamsAccessSamlTypeOidc AccessIdentityProviderUpdateParamsAccessSamlType = "oidc" + AccessIdentityProviderUpdateParamsAccessSamlTypeOkta AccessIdentityProviderUpdateParamsAccessSamlType = "okta" + AccessIdentityProviderUpdateParamsAccessSamlTypeOnelogin AccessIdentityProviderUpdateParamsAccessSamlType = "onelogin" + AccessIdentityProviderUpdateParamsAccessSamlTypePingone AccessIdentityProviderUpdateParamsAccessSamlType = "pingone" + AccessIdentityProviderUpdateParamsAccessSamlTypeYandex AccessIdentityProviderUpdateParamsAccessSamlType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessYandex struct { + Config param.Field[AccessIdentityProviderUpdateParamsAccessYandexConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessYandexScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderUpdateParamsAccessYandexType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessYandex) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessYandex) ImplementsAccessIdentityProviderUpdateParams() { + +} + +type AccessIdentityProviderUpdateParamsAccessYandexConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderUpdateParamsAccessYandexConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessYandexScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderUpdateParamsAccessYandexType string + +const ( + AccessIdentityProviderUpdateParamsAccessYandexTypeOnetimepin AccessIdentityProviderUpdateParamsAccessYandexType = "onetimepin" + AccessIdentityProviderUpdateParamsAccessYandexTypeAzureAd AccessIdentityProviderUpdateParamsAccessYandexType = "azureAD" + AccessIdentityProviderUpdateParamsAccessYandexTypeSaml AccessIdentityProviderUpdateParamsAccessYandexType = "saml" + AccessIdentityProviderUpdateParamsAccessYandexTypeCentrify AccessIdentityProviderUpdateParamsAccessYandexType = "centrify" + AccessIdentityProviderUpdateParamsAccessYandexTypeFacebook AccessIdentityProviderUpdateParamsAccessYandexType = "facebook" + AccessIdentityProviderUpdateParamsAccessYandexTypeGitHub AccessIdentityProviderUpdateParamsAccessYandexType = "github" + AccessIdentityProviderUpdateParamsAccessYandexTypeGoogleApps AccessIdentityProviderUpdateParamsAccessYandexType = "google-apps" + AccessIdentityProviderUpdateParamsAccessYandexTypeGoogle AccessIdentityProviderUpdateParamsAccessYandexType = "google" + AccessIdentityProviderUpdateParamsAccessYandexTypeLinkedin AccessIdentityProviderUpdateParamsAccessYandexType = "linkedin" + AccessIdentityProviderUpdateParamsAccessYandexTypeOidc AccessIdentityProviderUpdateParamsAccessYandexType = "oidc" + AccessIdentityProviderUpdateParamsAccessYandexTypeOkta AccessIdentityProviderUpdateParamsAccessYandexType = "okta" + AccessIdentityProviderUpdateParamsAccessYandexTypeOnelogin AccessIdentityProviderUpdateParamsAccessYandexType = "onelogin" + AccessIdentityProviderUpdateParamsAccessYandexTypePingone AccessIdentityProviderUpdateParamsAccessYandexType = "pingone" + AccessIdentityProviderUpdateParamsAccessYandexTypeYandex AccessIdentityProviderUpdateParamsAccessYandexType = "yandex" +) + +type AccessIdentityProviderUpdateParamsAccessOnetimepin struct { + Config param.Field[interface{}] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderUpdateParamsAccessOnetimepinScimConfig] `json:"scim_config"` + Type param.Field[AccessIdentityProviderUpdateParamsAccessOnetimepinType] `json:"type"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOnetimepin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderUpdateParamsAccessOnetimepin) ImplementsAccessIdentityProviderUpdateParams() { + +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderUpdateParamsAccessOnetimepinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderUpdateParamsAccessOnetimepinScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessIdentityProviderUpdateParamsAccessOnetimepinType string + +const ( + AccessIdentityProviderUpdateParamsAccessOnetimepinTypeOnetimepin AccessIdentityProviderUpdateParamsAccessOnetimepinType = "onetimepin" +) + +// This interface is a union satisfied by one of the following: +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAd], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrify], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebook], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHub], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogle], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleApps], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedin], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidc], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOkta], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnelogin], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingone], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSaml], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandex], +// [AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepin]. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams interface { + ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAd struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAd) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAd) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // Should Cloudflare try to load authentication contexts from your account + ConditionalAccessEnabled param.Field[bool] `json:"conditional_access_enabled"` + // Your Azure directory uuid + DirectoryID param.Field[string] `json:"directory_id"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Should Cloudflare try to load groups from your account + SupportGroups param.Field[bool] `json:"support_groups"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrify struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrify) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrify) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount param.Field[string] `json:"centrify_account"` + // Your centrify app id + CentrifyAppID param.Field[string] `json:"centrify_app_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessCentrifyType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebook struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebook) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebook) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessFacebookType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHub struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHub) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHub) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGitHubType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogle struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogle) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogle) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleApps struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleApps) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleApps) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain param.Field[string] `json:"apps_domain"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessGoogleAppsType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedin struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedin) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessLinkedinType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidc struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidc) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidc) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL param.Field[string] `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CertsURL param.Field[string] `json:"certs_url"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // OAuth scopes + Scopes param.Field[[]string] `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL param.Field[string] `json:"token_url"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOidcType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOkta struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOkta) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID param.Field[string] `json:"authorization_server_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your okta account url + OktaAccount param.Field[string] `json:"okta_account"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOktaType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnelogin struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnelogin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnelogin) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount param.Field[string] `json:"onelogin_account"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOneloginType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingone struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingone) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingone) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID param.Field[string] `json:"ping_env_id"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessPingoneType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSaml struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSaml) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSaml) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes param.Field[[]string] `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName param.Field[string] `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes param.Field[[]AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfigHeaderAttribute] `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + IdpPublicCerts param.Field[[]string] `json:"idp_public_certs"` + // IdP Entity ID or Issuer URL + IssuerURL param.Field[string] `json:"issuer_url"` + // Sign the SAML authentication request with Access credentials. To verify the + // signature, use the public key from the Access certs endpoints. + SignRequest param.Field[bool] `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL param.Field[string] `json:"sso_target_url"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName param.Field[string] `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName param.Field[string] `json:"header_name"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessSamlType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandex struct { + Config param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexConfig] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexScimConfig] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandex) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandex) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexConfig struct { + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "onetimepin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeAzureAd AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "azureAD" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeSaml AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "saml" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeCentrify AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "centrify" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeFacebook AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "facebook" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeGitHub AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "github" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeGoogleApps AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "google-apps" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeGoogle AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "google" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeLinkedin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "linkedin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeOidc AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "oidc" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeOkta AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "okta" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeOnelogin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "onelogin" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypePingone AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "pingone" + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexTypeYandex AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessYandexType = "yandex" +) + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepin struct { + Config param.Field[interface{}] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinScimConfig] `json:"scim_config"` + Type param.Field[AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinType] `json:"type"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepin) ImplementsAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams() { + +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinScimConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinType string + +const ( + AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinTypeOnetimepin AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessOnetimepinType = "onetimepin" +) diff --git a/accessidentityprovider_test.go b/accessidentityprovider_test.go new file mode 100644 index 00000000000..27c33bb454d --- /dev/null +++ b/accessidentityprovider_test.go @@ -0,0 +1,207 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessIdentityProviderGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.IdentityProviders.Get( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessIdentityProviderUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.IdentityProviders.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessIdentityProviderUpdateParamsAccessAzureAd{ + Config: cloudflare.F(cloudflare.AccessIdentityProviderUpdateParamsAccessAzureAdConfig{ + ClientID: cloudflare.F(""), + ClientSecret: cloudflare.F(""), + Claims: cloudflare.F([]string{"email_verified", "preferred_username", "custom_claim_name"}), + EmailClaimName: cloudflare.F("custom_claim_name"), + ConditionalAccessEnabled: cloudflare.F(true), + DirectoryID: cloudflare.F(""), + SupportGroups: cloudflare.F(true), + }), + Name: cloudflare.F("Widget Corps IDP"), + ScimConfig: cloudflare.F(cloudflare.AccessIdentityProviderUpdateParamsAccessAzureAdScimConfig{ + Enabled: cloudflare.F(true), + GroupMemberDeprovision: cloudflare.F(true), + SeatDeprovision: cloudflare.F(true), + Secret: cloudflare.F("string"), + UserDeprovision: cloudflare.F(true), + }), + Type: cloudflare.F(cloudflare.AccessIdentityProviderUpdateParamsAccessAzureAdTypeOnetimepin), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessIdentityProviderDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.IdentityProviders.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.IdentityProviders.AccessIdentityProvidersAddAnAccessIdentityProvider( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAd{ + Config: cloudflare.F(cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdConfig{ + ClientID: cloudflare.F(""), + ClientSecret: cloudflare.F(""), + Claims: cloudflare.F([]string{"email_verified", "preferred_username", "custom_claim_name"}), + EmailClaimName: cloudflare.F("custom_claim_name"), + ConditionalAccessEnabled: cloudflare.F(true), + DirectoryID: cloudflare.F(""), + SupportGroups: cloudflare.F(true), + }), + Name: cloudflare.F("Widget Corps IDP"), + ScimConfig: cloudflare.F(cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdScimConfig{ + Enabled: cloudflare.F(true), + GroupMemberDeprovision: cloudflare.F(true), + SeatDeprovision: cloudflare.F(true), + Secret: cloudflare.F("string"), + UserDeprovision: cloudflare.F(true), + }), + Type: cloudflare.F(cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParamsAccessAzureAdTypeOnetimepin), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessIdentityProviderAccessIdentityProvidersListAccessIdentityProviders(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.IdentityProviders.AccessIdentityProvidersListAccessIdentityProviders( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accesskey.go b/accesskey.go new file mode 100644 index 00000000000..695eeb3c5e1 --- /dev/null +++ b/accesskey.go @@ -0,0 +1,260 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/option" + "github.com/tidwall/gjson" +) + +// AccessKeyService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessKeyService] method instead. +type AccessKeyService struct { + Options []option.RequestOption + Rotates *AccessKeyRotateService +} + +// NewAccessKeyService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessKeyService(opts ...option.RequestOption) (r *AccessKeyService) { + r = &AccessKeyService{} + r.Options = opts + r.Rotates = NewAccessKeyRotateService(opts...) + return +} + +// Gets the Access key rotation settings for an account. +func (r *AccessKeyService) AccessKeyConfigurationGetTheAccessKeyConfiguration(ctx context.Context, identifier string, opts ...option.RequestOption) (res *AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/keys", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates the Access key rotation settings for an account. +func (r *AccessKeyService) AccessKeyConfigurationUpdateTheAccessKeyConfiguration(ctx context.Context, identifier string, body AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationParams, opts ...option.RequestOption) (res *AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/keys", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +type AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse struct { + // The number of days until the next key rotation. + DaysUntilNextRotation float64 `json:"days_until_next_rotation"` + Errors []AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseError `json:"errors"` + // The number of days between key rotations. + KeyRotationIntervalDays float64 `json:"key_rotation_interval_days"` + // The timestamp of the previous key rotation. + LastKeyRotationAt time.Time `json:"last_key_rotation_at" format:"date-time"` + Messages []AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessage `json:"messages"` + Result AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseSuccess `json:"success"` + JSON accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseJSON contains +// the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse] +type accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseJSON struct { + DaysUntilNextRotation apijson.Field + Errors apijson.Field + KeyRotationIntervalDays apijson.Field + LastKeyRotationAt apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseErrorJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseError] +type accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessageJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessage] +type accessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResultUnknown] +// or [shared.UnionString]. +type AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResult interface { + ImplementsAccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResult() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResult)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) +} + +// Whether the API call was successful +type AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseSuccess bool + +const ( + AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseSuccessTrue AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseSuccess = true +) + +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse struct { + // The number of days until the next key rotation. + DaysUntilNextRotation float64 `json:"days_until_next_rotation"` + Errors []AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseError `json:"errors"` + // The number of days between key rotations. + KeyRotationIntervalDays float64 `json:"key_rotation_interval_days"` + // The timestamp of the previous key rotation. + LastKeyRotationAt time.Time `json:"last_key_rotation_at" format:"date-time"` + Messages []AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessage `json:"messages"` + Result AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseSuccess `json:"success"` + JSON accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseJSON +// contains the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse] +type accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseJSON struct { + DaysUntilNextRotation apijson.Field + Errors apijson.Field + KeyRotationIntervalDays apijson.Field + LastKeyRotationAt apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseErrorJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseError] +type accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessageJSON `json:"-"` +} + +// accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessage] +type accessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResultUnknown] +// or [shared.UnionString]. +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResult interface { + ImplementsAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResult() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResult)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) +} + +// Whether the API call was successful +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseSuccess bool + +const ( + AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseSuccessTrue AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseSuccess = true +) + +type AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationParams struct { + // The number of days between key rotations. + KeyRotationIntervalDays param.Field[float64] `json:"key_rotation_interval_days,required"` +} + +func (r AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/zonednssec_test.go b/accesskey_test.go similarity index 63% rename from zonednssec_test.go rename to accesskey_test.go index dcdd982a3b4..4fb81a9d980 100644 --- a/zonednssec_test.go +++ b/accesskey_test.go @@ -13,7 +13,8 @@ import ( "github.com/cloudflare/cloudflare-sdk-go/option" ) -func TestZoneDnssecGet(t *testing.T) { +func TestAccessKeyAccessKeyConfigurationGetTheAccessKeyConfiguration(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,10 +25,11 @@ func TestZoneDnssecGet(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.Dnssecs.Get(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + _, err := client.Access.Keys.AccessKeyConfigurationGetTheAccessKeyConfiguration(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { @@ -37,7 +39,8 @@ func TestZoneDnssecGet(t *testing.T) { } } -func TestZoneDnssecUpdateWithOptionalParams(t *testing.T) { +func TestAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfiguration(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,16 +51,15 @@ func TestZoneDnssecUpdateWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.Dnssecs.Update( + _, err := client.Access.Keys.AccessKeyConfigurationUpdateTheAccessKeyConfiguration( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneDnssecUpdateParams{ - DnssecMultiSigner: cloudflare.F(false), - DnssecPresigned: cloudflare.F(true), - Status: cloudflare.F(cloudflare.ZoneDnssecUpdateParamsStatusActive), + cloudflare.AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationParams{ + KeyRotationIntervalDays: cloudflare.F(30.000000), }, ) if err != nil { diff --git a/accesskeyrotate.go b/accesskeyrotate.go new file mode 100644 index 00000000000..453a19e4df2 --- /dev/null +++ b/accesskeyrotate.go @@ -0,0 +1,142 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/option" + "github.com/tidwall/gjson" +) + +// AccessKeyRotateService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessKeyRotateService] method +// instead. +type AccessKeyRotateService struct { + Options []option.RequestOption +} + +// NewAccessKeyRotateService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessKeyRotateService(opts ...option.RequestOption) (r *AccessKeyRotateService) { + r = &AccessKeyRotateService{} + r.Options = opts + return +} + +// Perfoms a key rotation for an account. +func (r *AccessKeyRotateService) AccessKeyConfigurationRotateAccessKeys(ctx context.Context, identifier string, opts ...option.RequestOption) (res *AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/keys/rotate", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse struct { + // The number of days until the next key rotation. + DaysUntilNextRotation float64 `json:"days_until_next_rotation"` + Errors []AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseError `json:"errors"` + // The number of days between key rotations. + KeyRotationIntervalDays float64 `json:"key_rotation_interval_days"` + // The timestamp of the previous key rotation. + LastKeyRotationAt time.Time `json:"last_key_rotation_at" format:"date-time"` + Messages []AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessage `json:"messages"` + Result AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResult `json:"result"` + // Whether the API call was successful + Success AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseSuccess `json:"success"` + JSON accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseJSON `json:"-"` +} + +// accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseJSON contains the +// JSON metadata for the struct +// [AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse] +type accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseJSON struct { + DaysUntilNextRotation apijson.Field + Errors apijson.Field + KeyRotationIntervalDays apijson.Field + LastKeyRotationAt apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseErrorJSON `json:"-"` +} + +// accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseErrorJSON contains +// the JSON metadata for the struct +// [AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseError] +type accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessageJSON `json:"-"` +} + +// accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessage] +type accessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResultUnknown] or +// [shared.UnionString]. +type AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResult interface { + ImplementsAccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResult() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResult)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) +} + +// Whether the API call was successful +type AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseSuccess bool + +const ( + AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseSuccessTrue AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseSuccess = true +) diff --git a/accesskeyrotate_test.go b/accesskeyrotate_test.go new file mode 100644 index 00000000000..88002ab5bfb --- /dev/null +++ b/accesskeyrotate_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessKeyRotateAccessKeyConfigurationRotateAccessKeys(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Keys.Rotates.AccessKeyConfigurationRotateAccessKeys(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accesslog.go b/accesslog.go new file mode 100644 index 00000000000..b24c1c05d1f --- /dev/null +++ b/accesslog.go @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessLogService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessLogService] method instead. +type AccessLogService struct { + Options []option.RequestOption + AccessRequests *AccessLogAccessRequestService +} + +// NewAccessLogService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessLogService(opts ...option.RequestOption) (r *AccessLogService) { + r = &AccessLogService{} + r.Options = opts + r.AccessRequests = NewAccessLogAccessRequestService(opts...) + return +} diff --git a/accesslogaccessrequest.go b/accesslogaccessrequest.go new file mode 100644 index 00000000000..1a9cbb2b58c --- /dev/null +++ b/accesslogaccessrequest.go @@ -0,0 +1,184 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessLogAccessRequestService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessLogAccessRequestService] +// method instead. +type AccessLogAccessRequestService struct { + Options []option.RequestOption +} + +// NewAccessLogAccessRequestService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessLogAccessRequestService(opts ...option.RequestOption) (r *AccessLogAccessRequestService) { + r = &AccessLogAccessRequestService{} + r.Options = opts + return +} + +// Gets a list of Access authentication audit logs for an account. +func (r *AccessLogAccessRequestService) AccessAuthenticationLogsGetAccessAuthenticationLogs(ctx context.Context, identifier string, opts ...option.RequestOption) (res *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/logs/access_requests", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse struct { + Errors []AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseError `json:"errors"` + Messages []AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessage `json:"messages"` + Result []AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResult `json:"result"` + ResultInfo AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseSuccess `json:"success"` + JSON accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseJSON `json:"-"` +} + +// accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseJSON +// contains the JSON metadata for the struct +// [AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse] +type accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseErrorJSON `json:"-"` +} + +// accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseError] +type accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessageJSON `json:"-"` +} + +// accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessage] +type accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResult struct { + // The event that occurred, such as a login attempt. + Action string `json:"action"` + // The result of the authentication event. + Allowed bool `json:"allowed"` + // The URL of the Access application. + AppDomain string `json:"app_domain"` + // The unique identifier for the Access application. + AppUid interface{} `json:"app_uid"` + // The IdP used to authenticate. + Connection string `json:"connection"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The IP address of the authenticating user. + IPAddress string `json:"ip_address"` + // The unique identifier for the request to Cloudflare. + RayID string `json:"ray_id"` + // The email address of the authenticating user. + UserEmail string `json:"user_email" format:"email"` + JSON accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultJSON `json:"-"` +} + +// accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultJSON +// contains the JSON metadata for the struct +// [AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResult] +type accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultJSON struct { + Action apijson.Field + Allowed apijson.Field + AppDomain apijson.Field + AppUid apijson.Field + Connection apijson.Field + CreatedAt apijson.Field + IPAddress apijson.Field + RayID apijson.Field + UserEmail apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfoJSON `json:"-"` +} + +// accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfo] +type accessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseSuccess bool + +const ( + AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseSuccessTrue AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponseSuccess = true +) diff --git a/accesslogaccessrequest_test.go b/accesslogaccessrequest_test.go new file mode 100644 index 00000000000..03abbee2fe9 --- /dev/null +++ b/accesslogaccessrequest_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogs(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Logs.AccessRequests.AccessAuthenticationLogsGetAccessAuthenticationLogs(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessorganization.go b/accessorganization.go new file mode 100644 index 00000000000..60b88fc01f8 --- /dev/null +++ b/accessorganization.go @@ -0,0 +1,732 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessOrganizationService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessOrganizationService] method +// instead. +type AccessOrganizationService struct { + Options []option.RequestOption +} + +// NewAccessOrganizationService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessOrganizationService(opts ...option.RequestOption) (r *AccessOrganizationService) { + r = &AccessOrganizationService{} + r.Options = opts + return +} + +// Sets up a Zero Trust organization for your account or zone. +func (r *AccessOrganizationService) ZeroTrustOrganizationNewYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParams, opts ...option.RequestOption) (res *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/organizations", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Returns the configuration for your Zero Trust organization. +func (r *AccessOrganizationService) ZeroTrustOrganizationGetYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/organizations", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Updates the configuration for your Zero Trust organization. +func (r *AccessOrganizationService) ZeroTrustOrganizationUpdateYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParams, opts ...option.RequestOption) (res *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/organizations", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse struct { + Errors []AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseError `json:"errors"` + Messages []AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessage `json:"messages"` + Result AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseSuccess `json:"success"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseErrorJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseError] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessageJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessage] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResult struct { + // When set to true, users can authenticate via WARP for any application in your + // organization. Application settings will take precedence over this value. + AllowAuthenticateViaWarp bool `json:"allow_authenticate_via_warp"` + // The unique subdomain assigned to your Zero Trust organization. + AuthDomain string `json:"auth_domain"` + // When set to `true`, users skip the identity provider selection step during + // login. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + CustomPages AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPages `json:"custom_pages"` + // Lock all settings as Read-Only in the Dashboard, regardless of user permission. + // Updates may only be made via the API or Terraform for this account when enabled. + IsUiReadOnly bool `json:"is_ui_read_only"` + LoginDesign AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesign `json:"login_design"` + // The name of your Zero Trust organization. + Name string `json:"name"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, + // h. + SessionDuration string `json:"session_duration"` + // A description of the reason why the UI read only field is being toggled. + UiReadOnlyToggleReason string `json:"ui_read_only_toggle_reason"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // The amount of time a user seat is inactive before it expires. When the user seat + // exceeds the set time of inactivity, the user is removed as an active seat and no + // longer counts against your Teams seat count. Must be in the format `300ms` or + // `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. + UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `30m` or `2h45m`. Valid time units are: m, h. + WarpAuthSessionDuration string `json:"warp_auth_session_duration"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResult] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultJSON struct { + AllowAuthenticateViaWarp apijson.Field + AuthDomain apijson.Field + AutoRedirectToIdentity apijson.Field + CreatedAt apijson.Field + CustomPages apijson.Field + IsUiReadOnly apijson.Field + LoginDesign apijson.Field + Name apijson.Field + SessionDuration apijson.Field + UiReadOnlyToggleReason apijson.Field + UpdatedAt apijson.Field + UserSeatExpirationInactiveTime apijson.Field + WarpAuthSessionDuration apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPages struct { + // The uid of the custom page to use when a user is denied access after failing a + // non-identity rule. + Forbidden string `json:"forbidden"` + // The uid of the custom page to use when a user is denied access. + IdentityDenied string `json:"identity_denied"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPagesJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPagesJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPages] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPagesJSON struct { + Forbidden apijson.Field + IdentityDenied apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultCustomPages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesign struct { + // The background color on your login page. + BackgroundColor string `json:"background_color"` + // The text at the bottom of your login page. + FooterText string `json:"footer_text"` + // The text at the top of your login page. + HeaderText string `json:"header_text"` + // The URL of the logo on your login page. + LogoPath string `json:"logo_path"` + // The text color on your login page. + TextColor string `json:"text_color"` + JSON accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesignJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesignJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesign] +type accessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesignJSON struct { + BackgroundColor apijson.Field + FooterText apijson.Field + HeaderText apijson.Field + LogoPath apijson.Field + TextColor apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseResultLoginDesign) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseSuccess bool + +const ( + AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseSuccessTrue AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponseSuccess = true +) + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse struct { + Errors []AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseError `json:"errors"` + Messages []AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessage `json:"messages"` + Result AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseSuccess `json:"success"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseErrorJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseError] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessageJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessage] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResult struct { + // When set to true, users can authenticate via WARP for any application in your + // organization. Application settings will take precedence over this value. + AllowAuthenticateViaWarp bool `json:"allow_authenticate_via_warp"` + // The unique subdomain assigned to your Zero Trust organization. + AuthDomain string `json:"auth_domain"` + // When set to `true`, users skip the identity provider selection step during + // login. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + CustomPages AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPages `json:"custom_pages"` + // Lock all settings as Read-Only in the Dashboard, regardless of user permission. + // Updates may only be made via the API or Terraform for this account when enabled. + IsUiReadOnly bool `json:"is_ui_read_only"` + LoginDesign AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesign `json:"login_design"` + // The name of your Zero Trust organization. + Name string `json:"name"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, + // h. + SessionDuration string `json:"session_duration"` + // A description of the reason why the UI read only field is being toggled. + UiReadOnlyToggleReason string `json:"ui_read_only_toggle_reason"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // The amount of time a user seat is inactive before it expires. When the user seat + // exceeds the set time of inactivity, the user is removed as an active seat and no + // longer counts against your Teams seat count. Must be in the format `300ms` or + // `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. + UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `30m` or `2h45m`. Valid time units are: m, h. + WarpAuthSessionDuration string `json:"warp_auth_session_duration"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResult] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultJSON struct { + AllowAuthenticateViaWarp apijson.Field + AuthDomain apijson.Field + AutoRedirectToIdentity apijson.Field + CreatedAt apijson.Field + CustomPages apijson.Field + IsUiReadOnly apijson.Field + LoginDesign apijson.Field + Name apijson.Field + SessionDuration apijson.Field + UiReadOnlyToggleReason apijson.Field + UpdatedAt apijson.Field + UserSeatExpirationInactiveTime apijson.Field + WarpAuthSessionDuration apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPages struct { + // The uid of the custom page to use when a user is denied access after failing a + // non-identity rule. + Forbidden string `json:"forbidden"` + // The uid of the custom page to use when a user is denied access. + IdentityDenied string `json:"identity_denied"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPagesJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPagesJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPages] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPagesJSON struct { + Forbidden apijson.Field + IdentityDenied apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultCustomPages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesign struct { + // The background color on your login page. + BackgroundColor string `json:"background_color"` + // The text at the bottom of your login page. + FooterText string `json:"footer_text"` + // The text at the top of your login page. + HeaderText string `json:"header_text"` + // The URL of the logo on your login page. + LogoPath string `json:"logo_path"` + // The text color on your login page. + TextColor string `json:"text_color"` + JSON accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesignJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesignJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesign] +type accessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesignJSON struct { + BackgroundColor apijson.Field + FooterText apijson.Field + HeaderText apijson.Field + LogoPath apijson.Field + TextColor apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseResultLoginDesign) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseSuccess bool + +const ( + AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseSuccessTrue AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponseSuccess = true +) + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse struct { + Errors []AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseError `json:"errors"` + Messages []AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessage `json:"messages"` + Result AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResult `json:"result"` + // Whether the API call was successful + Success AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseSuccess `json:"success"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseErrorJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseError] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessageJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessage] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResult struct { + // When set to true, users can authenticate via WARP for any application in your + // organization. Application settings will take precedence over this value. + AllowAuthenticateViaWarp bool `json:"allow_authenticate_via_warp"` + // The unique subdomain assigned to your Zero Trust organization. + AuthDomain string `json:"auth_domain"` + // When set to `true`, users skip the identity provider selection step during + // login. + AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + CustomPages AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPages `json:"custom_pages"` + // Lock all settings as Read-Only in the Dashboard, regardless of user permission. + // Updates may only be made via the API or Terraform for this account when enabled. + IsUiReadOnly bool `json:"is_ui_read_only"` + LoginDesign AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesign `json:"login_design"` + // The name of your Zero Trust organization. + Name string `json:"name"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, + // h. + SessionDuration string `json:"session_duration"` + // A description of the reason why the UI read only field is being toggled. + UiReadOnlyToggleReason string `json:"ui_read_only_toggle_reason"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // The amount of time a user seat is inactive before it expires. When the user seat + // exceeds the set time of inactivity, the user is removed as an active seat and no + // longer counts against your Teams seat count. Must be in the format `300ms` or + // `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. + UserSeatExpirationInactiveTime string `json:"user_seat_expiration_inactive_time"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `30m` or `2h45m`. Valid time units are: m, h. + WarpAuthSessionDuration string `json:"warp_auth_session_duration"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResult] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultJSON struct { + AllowAuthenticateViaWarp apijson.Field + AuthDomain apijson.Field + AutoRedirectToIdentity apijson.Field + CreatedAt apijson.Field + CustomPages apijson.Field + IsUiReadOnly apijson.Field + LoginDesign apijson.Field + Name apijson.Field + SessionDuration apijson.Field + UiReadOnlyToggleReason apijson.Field + UpdatedAt apijson.Field + UserSeatExpirationInactiveTime apijson.Field + WarpAuthSessionDuration apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPages struct { + // The uid of the custom page to use when a user is denied access after failing a + // non-identity rule. + Forbidden string `json:"forbidden"` + // The uid of the custom page to use when a user is denied access. + IdentityDenied string `json:"identity_denied"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPagesJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPagesJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPages] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPagesJSON struct { + Forbidden apijson.Field + IdentityDenied apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultCustomPages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesign struct { + // The background color on your login page. + BackgroundColor string `json:"background_color"` + // The text at the bottom of your login page. + FooterText string `json:"footer_text"` + // The text at the top of your login page. + HeaderText string `json:"header_text"` + // The URL of the logo on your login page. + LogoPath string `json:"logo_path"` + // The text color on your login page. + TextColor string `json:"text_color"` + JSON accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesignJSON `json:"-"` +} + +// accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesignJSON +// contains the JSON metadata for the struct +// [AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesign] +type accessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesignJSON struct { + BackgroundColor apijson.Field + FooterText apijson.Field + HeaderText apijson.Field + LogoPath apijson.Field + TextColor apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseResultLoginDesign) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseSuccess bool + +const ( + AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseSuccessTrue AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponseSuccess = true +) + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParams struct { + // The unique subdomain assigned to your Zero Trust organization. + AuthDomain param.Field[string] `json:"auth_domain,required"` + // The name of your Zero Trust organization. + Name param.Field[string] `json:"name,required"` + // When set to true, users can authenticate via WARP for any application in your + // organization. Application settings will take precedence over this value. + AllowAuthenticateViaWarp param.Field[bool] `json:"allow_authenticate_via_warp"` + // When set to `true`, users skip the identity provider selection step during + // login. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + // Lock all settings as Read-Only in the Dashboard, regardless of user permission. + // Updates may only be made via the API or Terraform for this account when enabled. + IsUiReadOnly param.Field[bool] `json:"is_ui_read_only"` + LoginDesign param.Field[AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParamsLoginDesign] `json:"login_design"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, + // h. + SessionDuration param.Field[string] `json:"session_duration"` + // A description of the reason why the UI read only field is being toggled. + UiReadOnlyToggleReason param.Field[string] `json:"ui_read_only_toggle_reason"` + // The amount of time a user seat is inactive before it expires. When the user seat + // exceeds the set time of inactivity, the user is removed as an active seat and no + // longer counts against your Teams seat count. Must be in the format `300ms` or + // `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. + UserSeatExpirationInactiveTime param.Field[string] `json:"user_seat_expiration_inactive_time"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `30m` or `2h45m`. Valid time units are: m, h. + WarpAuthSessionDuration param.Field[string] `json:"warp_auth_session_duration"` +} + +func (r AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParamsLoginDesign struct { + // The background color on your login page. + BackgroundColor param.Field[string] `json:"background_color"` + // The text at the bottom of your login page. + FooterText param.Field[string] `json:"footer_text"` + // The text at the top of your login page. + HeaderText param.Field[string] `json:"header_text"` + // The URL of the logo on your login page. + LogoPath param.Field[string] `json:"logo_path"` + // The text color on your login page. + TextColor param.Field[string] `json:"text_color"` +} + +func (r AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParamsLoginDesign) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParams struct { + // When set to true, users can authenticate via WARP for any application in your + // organization. Application settings will take precedence over this value. + AllowAuthenticateViaWarp param.Field[bool] `json:"allow_authenticate_via_warp"` + // The unique subdomain assigned to your Zero Trust organization. + AuthDomain param.Field[string] `json:"auth_domain"` + // When set to `true`, users skip the identity provider selection step during + // login. + AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` + CustomPages param.Field[AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsCustomPages] `json:"custom_pages"` + // Lock all settings as Read-Only in the Dashboard, regardless of user permission. + // Updates may only be made via the API or Terraform for this account when enabled. + IsUiReadOnly param.Field[bool] `json:"is_ui_read_only"` + LoginDesign param.Field[AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsLoginDesign] `json:"login_design"` + // The name of your Zero Trust organization. + Name param.Field[string] `json:"name"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, + // h. + SessionDuration param.Field[string] `json:"session_duration"` + // A description of the reason why the UI read only field is being toggled. + UiReadOnlyToggleReason param.Field[string] `json:"ui_read_only_toggle_reason"` + // The amount of time a user seat is inactive before it expires. When the user seat + // exceeds the set time of inactivity, the user is removed as an active seat and no + // longer counts against your Teams seat count. Must be in the format `300ms` or + // `2h45m`. Valid time units are: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. + UserSeatExpirationInactiveTime param.Field[string] `json:"user_seat_expiration_inactive_time"` + // The amount of time that tokens issued for applications will be valid. Must be in + // the format `30m` or `2h45m`. Valid time units are: m, h. + WarpAuthSessionDuration param.Field[string] `json:"warp_auth_session_duration"` +} + +func (r AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsCustomPages struct { + // The uid of the custom page to use when a user is denied access after failing a + // non-identity rule. + Forbidden param.Field[string] `json:"forbidden"` + // The uid of the custom page to use when a user is denied access. + IdentityDenied param.Field[string] `json:"identity_denied"` +} + +func (r AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsCustomPages) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsLoginDesign struct { + // The background color on your login page. + BackgroundColor param.Field[string] `json:"background_color"` + // The text at the bottom of your login page. + FooterText param.Field[string] `json:"footer_text"` + // The text at the top of your login page. + HeaderText param.Field[string] `json:"header_text"` + // The URL of the logo on your login page. + LogoPath param.Field[string] `json:"logo_path"` + // The text color on your login page. + TextColor param.Field[string] `json:"text_color"` +} + +func (r AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsLoginDesign) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accessorganization_test.go b/accessorganization_test.go new file mode 100644 index 00000000000..fa53359957e --- /dev/null +++ b/accessorganization_test.go @@ -0,0 +1,144 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Organizations.ZeroTrustOrganizationNewYourZeroTrustOrganization( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParams{ + AuthDomain: cloudflare.F("test.cloudflareaccess.com"), + Name: cloudflare.F("Widget Corps Internal Applications"), + AllowAuthenticateViaWarp: cloudflare.F(true), + AutoRedirectToIdentity: cloudflare.F(true), + IsUiReadOnly: cloudflare.F(true), + LoginDesign: cloudflare.F(cloudflare.AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParamsLoginDesign{ + BackgroundColor: cloudflare.F("#c5ed1b"), + FooterText: cloudflare.F("This is an example description."), + HeaderText: cloudflare.F("This is an example description."), + LogoPath: cloudflare.F("https://example.com/logo.png"), + TextColor: cloudflare.F("#c5ed1b"), + }), + SessionDuration: cloudflare.F("24h"), + UiReadOnlyToggleReason: cloudflare.F("Temporarily turn off the UI read only lock to make a change via the UI"), + UserSeatExpirationInactiveTime: cloudflare.F("720h"), + WarpAuthSessionDuration: cloudflare.F("24h"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganization(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Organizations.ZeroTrustOrganizationGetYourZeroTrustOrganization( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Organizations.ZeroTrustOrganizationUpdateYourZeroTrustOrganization( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParams{ + AllowAuthenticateViaWarp: cloudflare.F(true), + AuthDomain: cloudflare.F("test.cloudflareaccess.com"), + AutoRedirectToIdentity: cloudflare.F(true), + CustomPages: cloudflare.F(cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsCustomPages{ + Forbidden: cloudflare.F("699d98642c564d2e855e9661899b7252"), + IdentityDenied: cloudflare.F("699d98642c564d2e855e9661899b7252"), + }), + IsUiReadOnly: cloudflare.F(true), + LoginDesign: cloudflare.F(cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParamsLoginDesign{ + BackgroundColor: cloudflare.F("#c5ed1b"), + FooterText: cloudflare.F("This is an example description."), + HeaderText: cloudflare.F("This is an example description."), + LogoPath: cloudflare.F("https://example.com/logo.png"), + TextColor: cloudflare.F("#c5ed1b"), + }), + Name: cloudflare.F("Widget Corps Internal Applications"), + SessionDuration: cloudflare.F("24h"), + UiReadOnlyToggleReason: cloudflare.F("Temporarily turn off the UI read only lock to make a change via the UI"), + UserSeatExpirationInactiveTime: cloudflare.F("720h"), + WarpAuthSessionDuration: cloudflare.F("24h"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessseat.go b/accessseat.go new file mode 100644 index 00000000000..c22db38b3b2 --- /dev/null +++ b/accessseat.go @@ -0,0 +1,187 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessSeatService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessSeatService] method instead. +type AccessSeatService struct { + Options []option.RequestOption +} + +// NewAccessSeatService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessSeatService(opts ...option.RequestOption) (r *AccessSeatService) { + r = &AccessSeatService{} + r.Options = opts + return +} + +// Removes a user from a Zero Trust seat when both `access_seat` and `gateway_seat` +// are set to false. +func (r *AccessSeatService) ZeroTrustSeatsUpdateAUserSeat(ctx context.Context, identifier string, body AccessSeatZeroTrustSeatsUpdateAUserSeatParams, opts ...option.RequestOption) (res *AccessSeatZeroTrustSeatsUpdateAUserSeatResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/seats", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) + return +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponse struct { + Errors []AccessSeatZeroTrustSeatsUpdateAUserSeatResponseError `json:"errors"` + Messages []AccessSeatZeroTrustSeatsUpdateAUserSeatResponseMessage `json:"messages"` + Result []AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResult `json:"result"` + ResultInfo AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessSeatZeroTrustSeatsUpdateAUserSeatResponseSuccess `json:"success"` + JSON accessSeatZeroTrustSeatsUpdateAUserSeatResponseJSON `json:"-"` +} + +// accessSeatZeroTrustSeatsUpdateAUserSeatResponseJSON contains the JSON metadata +// for the struct [AccessSeatZeroTrustSeatsUpdateAUserSeatResponse] +type accessSeatZeroTrustSeatsUpdateAUserSeatResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessSeatZeroTrustSeatsUpdateAUserSeatResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessSeatZeroTrustSeatsUpdateAUserSeatResponseErrorJSON `json:"-"` +} + +// accessSeatZeroTrustSeatsUpdateAUserSeatResponseErrorJSON contains the JSON +// metadata for the struct [AccessSeatZeroTrustSeatsUpdateAUserSeatResponseError] +type accessSeatZeroTrustSeatsUpdateAUserSeatResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessSeatZeroTrustSeatsUpdateAUserSeatResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessSeatZeroTrustSeatsUpdateAUserSeatResponseMessageJSON `json:"-"` +} + +// accessSeatZeroTrustSeatsUpdateAUserSeatResponseMessageJSON contains the JSON +// metadata for the struct [AccessSeatZeroTrustSeatsUpdateAUserSeatResponseMessage] +type accessSeatZeroTrustSeatsUpdateAUserSeatResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessSeatZeroTrustSeatsUpdateAUserSeatResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResult struct { + // True if the seat is part of Access. + AccessSeat bool `json:"access_seat"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // True if the seat is part of Gateway. + GatewaySeat bool `json:"gateway_seat"` + // Identifier + SeatUid string `json:"seat_uid"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultJSON `json:"-"` +} + +// accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultJSON contains the JSON +// metadata for the struct [AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResult] +type accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultJSON struct { + AccessSeat apijson.Field + CreatedAt apijson.Field + GatewaySeat apijson.Field + SeatUid apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfoJSON `json:"-"` +} + +// accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfoJSON contains the JSON +// metadata for the struct +// [AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfo] +type accessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessSeatZeroTrustSeatsUpdateAUserSeatResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessSeatZeroTrustSeatsUpdateAUserSeatResponseSuccess bool + +const ( + AccessSeatZeroTrustSeatsUpdateAUserSeatResponseSuccessTrue AccessSeatZeroTrustSeatsUpdateAUserSeatResponseSuccess = true +) + +type AccessSeatZeroTrustSeatsUpdateAUserSeatParams struct { + Body param.Field[[]AccessSeatZeroTrustSeatsUpdateAUserSeatParamsBody] `json:"body,required"` +} + +func (r AccessSeatZeroTrustSeatsUpdateAUserSeatParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type AccessSeatZeroTrustSeatsUpdateAUserSeatParamsBody struct { + // True if the seat is part of Access. + AccessSeat param.Field[bool] `json:"access_seat,required"` + // True if the seat is part of Gateway. + GatewaySeat param.Field[bool] `json:"gateway_seat,required"` +} + +func (r AccessSeatZeroTrustSeatsUpdateAUserSeatParamsBody) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accessseat_test.go b/accessseat_test.go new file mode 100644 index 00000000000..2b0a64b7e1f --- /dev/null +++ b/accessseat_test.go @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessSeatZeroTrustSeatsUpdateAUserSeat(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Seats.ZeroTrustSeatsUpdateAUserSeat( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessSeatZeroTrustSeatsUpdateAUserSeatParams{ + Body: cloudflare.F([]cloudflare.AccessSeatZeroTrustSeatsUpdateAUserSeatParamsBody{{ + AccessSeat: cloudflare.F(false), + GatewaySeat: cloudflare.F(false), + }, { + AccessSeat: cloudflare.F(false), + GatewaySeat: cloudflare.F(false), + }, { + AccessSeat: cloudflare.F(false), + GatewaySeat: cloudflare.F(false), + }}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessservicetoken.go b/accessservicetoken.go new file mode 100644 index 00000000000..fe797531915 --- /dev/null +++ b/accessservicetoken.go @@ -0,0 +1,551 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessServiceTokenService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessServiceTokenService] method +// instead. +type AccessServiceTokenService struct { + Options []option.RequestOption + Refreshes *AccessServiceTokenRefreshService + Rotates *AccessServiceTokenRotateService +} + +// NewAccessServiceTokenService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessServiceTokenService(opts ...option.RequestOption) (r *AccessServiceTokenService) { + r = &AccessServiceTokenService{} + r.Options = opts + r.Refreshes = NewAccessServiceTokenRefreshService(opts...) + r.Rotates = NewAccessServiceTokenRotateService(opts...) + return +} + +// Updates a configured service token. +func (r *AccessServiceTokenService) Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body AccessServiceTokenUpdateParams, opts ...option.RequestOption) (res *AccessServiceTokenUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/service_tokens/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Deletes a service token. +func (r *AccessServiceTokenService) Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, opts ...option.RequestOption) (res *AccessServiceTokenDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/service_tokens/%s", accountOrZone, accountOrZoneID, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Generates a new service token. **Note:** This is the only time you can get the +// Client Secret. If you lose the Client Secret, you will have to rotate the Client +// Secret or create a new service token. +func (r *AccessServiceTokenService) AccessServiceTokensNewAServiceToken(ctx context.Context, accountOrZone string, accountOrZoneID string, body AccessServiceTokenAccessServiceTokensNewAServiceTokenParams, opts ...option.RequestOption) (res *AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/service_tokens", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists all service tokens. +func (r *AccessServiceTokenService) AccessServiceTokensListServiceTokens(ctx context.Context, accountOrZone string, accountOrZoneID string, opts ...option.RequestOption) (res *AccessServiceTokenAccessServiceTokensListServiceTokensResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("%s/%s/access/service_tokens", accountOrZone, accountOrZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessServiceTokenUpdateResponse struct { + Errors []AccessServiceTokenUpdateResponseError `json:"errors"` + Messages []AccessServiceTokenUpdateResponseMessage `json:"messages"` + Result AccessServiceTokenUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccessServiceTokenUpdateResponseSuccess `json:"success"` + JSON accessServiceTokenUpdateResponseJSON `json:"-"` +} + +// accessServiceTokenUpdateResponseJSON contains the JSON metadata for the struct +// [AccessServiceTokenUpdateResponse] +type accessServiceTokenUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenUpdateResponseErrorJSON `json:"-"` +} + +// accessServiceTokenUpdateResponseErrorJSON contains the JSON metadata for the +// struct [AccessServiceTokenUpdateResponseError] +type accessServiceTokenUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenUpdateResponseMessageJSON `json:"-"` +} + +// accessServiceTokenUpdateResponseMessageJSON contains the JSON metadata for the +// struct [AccessServiceTokenUpdateResponseMessage] +type accessServiceTokenUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenUpdateResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenUpdateResponseResultJSON `json:"-"` +} + +// accessServiceTokenUpdateResponseResultJSON contains the JSON metadata for the +// struct [AccessServiceTokenUpdateResponseResult] +type accessServiceTokenUpdateResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenUpdateResponseSuccess bool + +const ( + AccessServiceTokenUpdateResponseSuccessTrue AccessServiceTokenUpdateResponseSuccess = true +) + +type AccessServiceTokenDeleteResponse struct { + Errors []AccessServiceTokenDeleteResponseError `json:"errors"` + Messages []AccessServiceTokenDeleteResponseMessage `json:"messages"` + Result AccessServiceTokenDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success AccessServiceTokenDeleteResponseSuccess `json:"success"` + JSON accessServiceTokenDeleteResponseJSON `json:"-"` +} + +// accessServiceTokenDeleteResponseJSON contains the JSON metadata for the struct +// [AccessServiceTokenDeleteResponse] +type accessServiceTokenDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenDeleteResponseErrorJSON `json:"-"` +} + +// accessServiceTokenDeleteResponseErrorJSON contains the JSON metadata for the +// struct [AccessServiceTokenDeleteResponseError] +type accessServiceTokenDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenDeleteResponseMessageJSON `json:"-"` +} + +// accessServiceTokenDeleteResponseMessageJSON contains the JSON metadata for the +// struct [AccessServiceTokenDeleteResponseMessage] +type accessServiceTokenDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenDeleteResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenDeleteResponseResultJSON `json:"-"` +} + +// accessServiceTokenDeleteResponseResultJSON contains the JSON metadata for the +// struct [AccessServiceTokenDeleteResponseResult] +type accessServiceTokenDeleteResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenDeleteResponseSuccess bool + +const ( + AccessServiceTokenDeleteResponseSuccessTrue AccessServiceTokenDeleteResponseSuccess = true +) + +type AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse struct { + Errors []AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseError `json:"errors"` + Messages []AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessage `json:"messages"` + Result AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseResult `json:"result"` + // Whether the API call was successful + Success AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseSuccess `json:"success"` + JSON accessServiceTokenAccessServiceTokensNewAServiceTokenResponseJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensNewAServiceTokenResponseJSON contains the +// JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse] +type accessServiceTokenAccessServiceTokensNewAServiceTokenResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenAccessServiceTokensNewAServiceTokenResponseErrorJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensNewAServiceTokenResponseErrorJSON contains +// the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseError] +type accessServiceTokenAccessServiceTokensNewAServiceTokenResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessageJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessage] +type accessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + // The Client Secret for the service token. Access will check for this value in the + // `CF-Access-Client-Secret` request header. + ClientSecret string `json:"client_secret"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenAccessServiceTokensNewAServiceTokenResponseResultJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensNewAServiceTokenResponseResultJSON contains +// the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseResult] +type accessServiceTokenAccessServiceTokensNewAServiceTokenResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseSuccess bool + +const ( + AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseSuccessTrue AccessServiceTokenAccessServiceTokensNewAServiceTokenResponseSuccess = true +) + +type AccessServiceTokenAccessServiceTokensListServiceTokensResponse struct { + Errors []AccessServiceTokenAccessServiceTokensListServiceTokensResponseError `json:"errors"` + Messages []AccessServiceTokenAccessServiceTokensListServiceTokensResponseMessage `json:"messages"` + Result []AccessServiceTokenAccessServiceTokensListServiceTokensResponseResult `json:"result"` + ResultInfo AccessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessServiceTokenAccessServiceTokensListServiceTokensResponseSuccess `json:"success"` + JSON accessServiceTokenAccessServiceTokensListServiceTokensResponseJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensListServiceTokensResponseJSON contains the +// JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensListServiceTokensResponse] +type accessServiceTokenAccessServiceTokensListServiceTokensResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensListServiceTokensResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensListServiceTokensResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenAccessServiceTokensListServiceTokensResponseErrorJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensListServiceTokensResponseErrorJSON contains +// the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensListServiceTokensResponseError] +type accessServiceTokenAccessServiceTokensListServiceTokensResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensListServiceTokensResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensListServiceTokensResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenAccessServiceTokensListServiceTokensResponseMessageJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensListServiceTokensResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensListServiceTokensResponseMessage] +type accessServiceTokenAccessServiceTokensListServiceTokensResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensListServiceTokensResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensListServiceTokensResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenAccessServiceTokensListServiceTokensResponseResultJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensListServiceTokensResponseResultJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensListServiceTokensResponseResult] +type accessServiceTokenAccessServiceTokensListServiceTokensResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensListServiceTokensResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfoJSON `json:"-"` +} + +// accessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfo] +type accessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenAccessServiceTokensListServiceTokensResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenAccessServiceTokensListServiceTokensResponseSuccess bool + +const ( + AccessServiceTokenAccessServiceTokensListServiceTokensResponseSuccessTrue AccessServiceTokenAccessServiceTokensListServiceTokensResponseSuccess = true +) + +type AccessServiceTokenUpdateParams struct { + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration param.Field[string] `json:"duration"` + // The name of the service token. + Name param.Field[string] `json:"name"` +} + +func (r AccessServiceTokenUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccessServiceTokenAccessServiceTokensNewAServiceTokenParams struct { + // The name of the service token. + Name param.Field[string] `json:"name,required"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration param.Field[string] `json:"duration"` +} + +func (r AccessServiceTokenAccessServiceTokensNewAServiceTokenParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/accessservicetoken_test.go b/accessservicetoken_test.go new file mode 100644 index 00000000000..fb90c90193a --- /dev/null +++ b/accessservicetoken_test.go @@ -0,0 +1,144 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessServiceTokenUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.Update( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + cloudflare.AccessServiceTokenUpdateParams{ + Duration: cloudflare.F("60m"), + Name: cloudflare.F("CI/CD token"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessServiceTokenDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.Delete( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessServiceTokenAccessServiceTokensNewAServiceTokenWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.AccessServiceTokensNewAServiceToken( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.AccessServiceTokenAccessServiceTokensNewAServiceTokenParams{ + Name: cloudflare.F("CI/CD token"), + Duration: cloudflare.F("60m"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccessServiceTokenAccessServiceTokensListServiceTokens(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.AccessServiceTokensListServiceTokens( + context.TODO(), + "string", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessservicetokenrefresh.go b/accessservicetokenrefresh.go new file mode 100644 index 00000000000..abaeff4ebff --- /dev/null +++ b/accessservicetokenrefresh.go @@ -0,0 +1,147 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessServiceTokenRefreshService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewAccessServiceTokenRefreshService] method instead. +type AccessServiceTokenRefreshService struct { + Options []option.RequestOption +} + +// NewAccessServiceTokenRefreshService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewAccessServiceTokenRefreshService(opts ...option.RequestOption) (r *AccessServiceTokenRefreshService) { + r = &AccessServiceTokenRefreshService{} + r.Options = opts + return +} + +// Refreshes the expiration of a service token. +func (r *AccessServiceTokenRefreshService) AccessServiceTokensRefreshAServiceToken(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/service_tokens/%s/refresh", identifier, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse struct { + Errors []AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseError `json:"errors"` + Messages []AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessage `json:"messages"` + Result AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResult `json:"result"` + // Whether the API call was successful + Success AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseSuccess `json:"success"` + JSON accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseJSON `json:"-"` +} + +// accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse] +type accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseErrorJSON `json:"-"` +} + +// accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseError] +type accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessageJSON `json:"-"` +} + +// accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessage] +type accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResultJSON `json:"-"` +} + +// accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResultJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResult] +type accessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseSuccess bool + +const ( + AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseSuccessTrue AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponseSuccess = true +) diff --git a/accessservicetokenrefresh_test.go b/accessservicetokenrefresh_test.go new file mode 100644 index 00000000000..1c30d2bd0e6 --- /dev/null +++ b/accessservicetokenrefresh_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessServiceTokenRefreshAccessServiceTokensRefreshAServiceToken(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.Refreshes.AccessServiceTokensRefreshAServiceToken( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessservicetokenrotate.go b/accessservicetokenrotate.go new file mode 100644 index 00000000000..8c7ac882450 --- /dev/null +++ b/accessservicetokenrotate.go @@ -0,0 +1,151 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessServiceTokenRotateService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewAccessServiceTokenRotateService] method instead. +type AccessServiceTokenRotateService struct { + Options []option.RequestOption +} + +// NewAccessServiceTokenRotateService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewAccessServiceTokenRotateService(opts ...option.RequestOption) (r *AccessServiceTokenRotateService) { + r = &AccessServiceTokenRotateService{} + r.Options = opts + return +} + +// Generates a new Client Secret for a service token and revokes the old one. +func (r *AccessServiceTokenRotateService) AccessServiceTokensRotateAServiceToken(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/service_tokens/%s/rotate", identifier, uuid) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse struct { + Errors []AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseError `json:"errors"` + Messages []AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessage `json:"messages"` + Result AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResult `json:"result"` + // Whether the API call was successful + Success AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseSuccess `json:"success"` + JSON accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseJSON `json:"-"` +} + +// accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse] +type accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseErrorJSON `json:"-"` +} + +// accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseErrorJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseError] +type accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessageJSON `json:"-"` +} + +// accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessageJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessage] +type accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResult struct { + // The ID of the service token. + ID interface{} `json:"id"` + // The Client ID for the service token. Access will check for this value in the + // `CF-Access-Client-ID` request header. + ClientID string `json:"client_id"` + // The Client Secret for the service token. Access will check for this value in the + // `CF-Access-Client-Secret` request header. + ClientSecret string `json:"client_secret"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The duration for how long the service token will be valid. Must be in the format + // `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, m, h. The + // default is 1 year in hours (8760h). + Duration string `json:"duration"` + // The name of the service token. + Name string `json:"name"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResultJSON `json:"-"` +} + +// accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResultJSON +// contains the JSON metadata for the struct +// [AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResult] +type accessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResultJSON struct { + ID apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Name apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseSuccess bool + +const ( + AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseSuccessTrue AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponseSuccess = true +) diff --git a/accessservicetokenrotate_test.go b/accessservicetokenrotate_test.go new file mode 100644 index 00000000000..e2ad6f87671 --- /dev/null +++ b/accessservicetokenrotate_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessServiceTokenRotateAccessServiceTokensRotateAServiceToken(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.ServiceTokens.Rotates.AccessServiceTokensRotateAServiceToken( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessuser.go b/accessuser.go new file mode 100644 index 00000000000..082bac56857 --- /dev/null +++ b/accessuser.go @@ -0,0 +1,181 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessUserService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccessUserService] method instead. +type AccessUserService struct { + Options []option.RequestOption + FailedLogins *AccessUserFailedLoginService +} + +// NewAccessUserService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccessUserService(opts ...option.RequestOption) (r *AccessUserService) { + r = &AccessUserService{} + r.Options = opts + r.FailedLogins = NewAccessUserFailedLoginService(opts...) + return +} + +// Gets a list of users for an account. +func (r *AccessUserService) ZeroTrustUsersGetUsers(ctx context.Context, identifier string, opts ...option.RequestOption) (res *AccessUserZeroTrustUsersGetUsersResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/users", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessUserZeroTrustUsersGetUsersResponse struct { + Errors []AccessUserZeroTrustUsersGetUsersResponseError `json:"errors"` + Messages []AccessUserZeroTrustUsersGetUsersResponseMessage `json:"messages"` + Result []AccessUserZeroTrustUsersGetUsersResponseResult `json:"result"` + ResultInfo AccessUserZeroTrustUsersGetUsersResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessUserZeroTrustUsersGetUsersResponseSuccess `json:"success"` + JSON accessUserZeroTrustUsersGetUsersResponseJSON `json:"-"` +} + +// accessUserZeroTrustUsersGetUsersResponseJSON contains the JSON metadata for the +// struct [AccessUserZeroTrustUsersGetUsersResponse] +type accessUserZeroTrustUsersGetUsersResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserZeroTrustUsersGetUsersResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserZeroTrustUsersGetUsersResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessUserZeroTrustUsersGetUsersResponseErrorJSON `json:"-"` +} + +// accessUserZeroTrustUsersGetUsersResponseErrorJSON contains the JSON metadata for +// the struct [AccessUserZeroTrustUsersGetUsersResponseError] +type accessUserZeroTrustUsersGetUsersResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserZeroTrustUsersGetUsersResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserZeroTrustUsersGetUsersResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessUserZeroTrustUsersGetUsersResponseMessageJSON `json:"-"` +} + +// accessUserZeroTrustUsersGetUsersResponseMessageJSON contains the JSON metadata +// for the struct [AccessUserZeroTrustUsersGetUsersResponseMessage] +type accessUserZeroTrustUsersGetUsersResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserZeroTrustUsersGetUsersResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserZeroTrustUsersGetUsersResponseResult struct { + // UUID + ID string `json:"id"` + // True if the user has authenticated with Cloudflare Access. + AccessSeat bool `json:"access_seat"` + // The number of active devices registered to the user. + ActiveDeviceCount float64 `json:"active_device_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The email of the user. + Email string `json:"email" format:"email"` + // True if the user has logged into the WARP client. + GatewaySeat bool `json:"gateway_seat"` + // The time at which the user last successfully logged in. + LastSuccessfulLogin time.Time `json:"last_successful_login" format:"date-time"` + // The name of the user. + Name string `json:"name"` + // The unique API identifier for the Zero Trust seat. + SeatUid interface{} `json:"seat_uid"` + // The unique API identifier for the user. + Uid interface{} `json:"uid"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON accessUserZeroTrustUsersGetUsersResponseResultJSON `json:"-"` +} + +// accessUserZeroTrustUsersGetUsersResponseResultJSON contains the JSON metadata +// for the struct [AccessUserZeroTrustUsersGetUsersResponseResult] +type accessUserZeroTrustUsersGetUsersResponseResultJSON struct { + ID apijson.Field + AccessSeat apijson.Field + ActiveDeviceCount apijson.Field + CreatedAt apijson.Field + Email apijson.Field + GatewaySeat apijson.Field + LastSuccessfulLogin apijson.Field + Name apijson.Field + SeatUid apijson.Field + Uid apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserZeroTrustUsersGetUsersResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserZeroTrustUsersGetUsersResponseResultInfo struct { + Count interface{} `json:"count"` + Page interface{} `json:"page"` + PerPage interface{} `json:"per_page"` + TotalCount interface{} `json:"total_count"` + JSON accessUserZeroTrustUsersGetUsersResponseResultInfoJSON `json:"-"` +} + +// accessUserZeroTrustUsersGetUsersResponseResultInfoJSON contains the JSON +// metadata for the struct [AccessUserZeroTrustUsersGetUsersResponseResultInfo] +type accessUserZeroTrustUsersGetUsersResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserZeroTrustUsersGetUsersResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessUserZeroTrustUsersGetUsersResponseSuccess bool + +const ( + AccessUserZeroTrustUsersGetUsersResponseSuccessTrue AccessUserZeroTrustUsersGetUsersResponseSuccess = true +) diff --git a/accessuser_test.go b/accessuser_test.go new file mode 100644 index 00000000000..adae77dfc3c --- /dev/null +++ b/accessuser_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessUserZeroTrustUsersGetUsers(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Users.ZeroTrustUsersGetUsers(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accessuserfailedlogin.go b/accessuserfailedlogin.go new file mode 100644 index 00000000000..8a711e02de6 --- /dev/null +++ b/accessuserfailedlogin.go @@ -0,0 +1,161 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccessUserFailedLoginService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccessUserFailedLoginService] +// method instead. +type AccessUserFailedLoginService struct { + Options []option.RequestOption +} + +// NewAccessUserFailedLoginService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewAccessUserFailedLoginService(opts ...option.RequestOption) (r *AccessUserFailedLoginService) { + r = &AccessUserFailedLoginService{} + r.Options = opts + return +} + +// Get all failed login attempts for a single user. +func (r *AccessUserFailedLoginService) ZeroTrustUsersGetFailedLogins(ctx context.Context, identifier string, id string, opts ...option.RequestOption) (res *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/access/users/%s/failed_logins", identifier, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse struct { + Errors []AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseError `json:"errors"` + Messages []AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessage `json:"messages"` + Result []AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResult `json:"result"` + ResultInfo AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseSuccess `json:"success"` + JSON accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseJSON `json:"-"` +} + +// accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseJSON contains the JSON +// metadata for the struct +// [AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse] +type accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseErrorJSON `json:"-"` +} + +// accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseErrorJSON contains the +// JSON metadata for the struct +// [AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseError] +type accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessageJSON `json:"-"` +} + +// accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessageJSON contains +// the JSON metadata for the struct +// [AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessage] +type accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResult struct { + Expiration int64 `json:"expiration"` + Metadata interface{} `json:"metadata"` + JSON accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultJSON `json:"-"` +} + +// accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultJSON contains +// the JSON metadata for the struct +// [AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResult] +type accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultJSON struct { + Expiration apijson.Field + Metadata apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfoJSON `json:"-"` +} + +// accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfo] +type accessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseSuccess bool + +const ( + AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseSuccessTrue AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponseSuccess = true +) diff --git a/accessuserfailedlogin_test.go b/accessuserfailedlogin_test.go new file mode 100644 index 00000000000..4fa81e50487 --- /dev/null +++ b/accessuserfailedlogin_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccessUserFailedLoginZeroTrustUsersGetFailedLogins(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Access.Users.FailedLogins.ZeroTrustUsersGetFailedLogins( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/account.go b/account.go new file mode 100644 index 00000000000..1da0f201c15 --- /dev/null +++ b/account.go @@ -0,0 +1,372 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccountService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAccountService] method instead. +type AccountService struct { + Options []option.RequestOption +} + +// NewAccountService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewAccountService(opts ...option.RequestOption) (r *AccountService) { + r = &AccountService{} + r.Options = opts + return +} + +// Get information about a specific account that you are a member of. +func (r *AccountService) Get(ctx context.Context, identifier interface{}, opts ...option.RequestOption) (res *AccountGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Update an existing account. +func (r *AccountService) Update(ctx context.Context, identifier interface{}, body AccountUpdateParams, opts ...option.RequestOption) (res *AccountUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v", identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// List all accounts you have ownership or verified access to. +func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *AccountListResponse, err error) { + opts = append(r.Options[:], opts...) + path := "accounts" + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type AccountGetResponse struct { + Errors []AccountGetResponseError `json:"errors"` + Messages []AccountGetResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success AccountGetResponseSuccess `json:"success"` + JSON accountGetResponseJSON `json:"-"` +} + +// accountGetResponseJSON contains the JSON metadata for the struct +// [AccountGetResponse] +type accountGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountGetResponseErrorJSON `json:"-"` +} + +// accountGetResponseErrorJSON contains the JSON metadata for the struct +// [AccountGetResponseError] +type accountGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountGetResponseMessageJSON `json:"-"` +} + +// accountGetResponseMessageJSON contains the JSON metadata for the struct +// [AccountGetResponseMessage] +type accountGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountGetResponseSuccess bool + +const ( + AccountGetResponseSuccessTrue AccountGetResponseSuccess = true +) + +type AccountUpdateResponse struct { + Errors []AccountUpdateResponseError `json:"errors"` + Messages []AccountUpdateResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success AccountUpdateResponseSuccess `json:"success"` + JSON accountUpdateResponseJSON `json:"-"` +} + +// accountUpdateResponseJSON contains the JSON metadata for the struct +// [AccountUpdateResponse] +type accountUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountUpdateResponseErrorJSON `json:"-"` +} + +// accountUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccountUpdateResponseError] +type accountUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountUpdateResponseMessageJSON `json:"-"` +} + +// accountUpdateResponseMessageJSON contains the JSON metadata for the struct +// [AccountUpdateResponseMessage] +type accountUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountUpdateResponseSuccess bool + +const ( + AccountUpdateResponseSuccessTrue AccountUpdateResponseSuccess = true +) + +type AccountListResponse struct { + Errors []AccountListResponseError `json:"errors"` + Messages []AccountListResponseMessage `json:"messages"` + Result []interface{} `json:"result"` + ResultInfo AccountListResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccountListResponseSuccess `json:"success"` + JSON accountListResponseJSON `json:"-"` +} + +// accountListResponseJSON contains the JSON metadata for the struct +// [AccountListResponse] +type accountListResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountListResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountListResponseErrorJSON `json:"-"` +} + +// accountListResponseErrorJSON contains the JSON metadata for the struct +// [AccountListResponseError] +type accountListResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountListResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountListResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountListResponseMessageJSON `json:"-"` +} + +// accountListResponseMessageJSON contains the JSON metadata for the struct +// [AccountListResponseMessage] +type accountListResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountListResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountListResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accountListResponseResultInfoJSON `json:"-"` +} + +// accountListResponseResultInfoJSON contains the JSON metadata for the struct +// [AccountListResponseResultInfo] +type accountListResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountListResponseSuccess bool + +const ( + AccountListResponseSuccessTrue AccountListResponseSuccess = true +) + +type AccountUpdateParams struct { + // Account name + Name param.Field[string] `json:"name,required"` + // Account settings + Settings param.Field[AccountUpdateParamsSettings] `json:"settings"` +} + +func (r AccountUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Account settings +type AccountUpdateParamsSettings struct { + // Specifies the default nameservers to be used for new zones added to this + // account. + // + // - `cloudflare.standard` for Cloudflare-branded nameservers + // - `custom.account` for account custom nameservers + // - `custom.tenant` for tenant custom nameservers + // + // See + // [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) + // for more information. + DefaultNameservers param.Field[AccountUpdateParamsSettingsDefaultNameservers] `json:"default_nameservers"` + // Indicates whether membership in this account requires that Two-Factor + // Authentication is enabled + EnforceTwofactor param.Field[bool] `json:"enforce_twofactor"` + // Indicates whether new zones should use the account-level custom nameservers by + // default + UseAccountCustomNsByDefault param.Field[bool] `json:"use_account_custom_ns_by_default"` +} + +func (r AccountUpdateParamsSettings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Specifies the default nameservers to be used for new zones added to this +// account. +// +// - `cloudflare.standard` for Cloudflare-branded nameservers +// - `custom.account` for account custom nameservers +// - `custom.tenant` for tenant custom nameservers +// +// See +// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) +// for more information. +type AccountUpdateParamsSettingsDefaultNameservers string + +const ( + AccountUpdateParamsSettingsDefaultNameserversCloudflareStandard AccountUpdateParamsSettingsDefaultNameservers = "cloudflare.standard" + AccountUpdateParamsSettingsDefaultNameserversCustomAccount AccountUpdateParamsSettingsDefaultNameservers = "custom.account" + AccountUpdateParamsSettingsDefaultNameserversCustomTenant AccountUpdateParamsSettingsDefaultNameservers = "custom.tenant" +) + +type AccountListParams struct { + // Direction to order results. + Direction param.Field[AccountListParamsDirection] `query:"direction"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Maximum number of results per page. + PerPage param.Field[float64] `query:"per_page"` +} + +// URLQuery serializes [AccountListParams]'s query parameters as `url.Values`. +func (r AccountListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Direction to order results. +type AccountListParamsDirection string + +const ( + AccountListParamsDirectionAsc AccountListParamsDirection = "asc" + AccountListParamsDirectionDesc AccountListParamsDirection = "desc" +) diff --git a/account_test.go b/account_test.go new file mode 100644 index 00000000000..411c3496321 --- /dev/null +++ b/account_test.go @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccountGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Accounts.Get(context.TODO(), map[string]interface{}{}) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Accounts.Update( + context.TODO(), + map[string]interface{}{}, + cloudflare.AccountUpdateParams{ + Name: cloudflare.F("Demo Account"), + Settings: cloudflare.F(cloudflare.AccountUpdateParamsSettings{ + DefaultNameservers: cloudflare.F(cloudflare.AccountUpdateParamsSettingsDefaultNameserversCloudflareStandard), + EnforceTwofactor: cloudflare.F(true), + UseAccountCustomNsByDefault: cloudflare.F(true), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountListWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Accounts.List(context.TODO(), cloudflare.AccountListParams{ + Direction: cloudflare.F(cloudflare.AccountListParamsDirectionDesc), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(5.000000), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/accountmember.go b/accountmember.go new file mode 100644 index 00000000000..f3743391ac9 --- /dev/null +++ b/accountmember.go @@ -0,0 +1,1821 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// AccountMemberService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAccountMemberService] method +// instead. +type AccountMemberService struct { + Options []option.RequestOption +} + +// NewAccountMemberService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAccountMemberService(opts ...option.RequestOption) (r *AccountMemberService) { + r = &AccountMemberService{} + r.Options = opts + return +} + +// Get information about a specific member of an account. +func (r *AccountMemberService) Get(ctx context.Context, accountIdentifier interface{}, identifier string, opts ...option.RequestOption) (res *AccountMemberGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/members/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Modify an account member. +func (r *AccountMemberService) Update(ctx context.Context, accountIdentifier interface{}, identifier string, body AccountMemberUpdateParams, opts ...option.RequestOption) (res *AccountMemberUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/members/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Remove a member from an account. +func (r *AccountMemberService) Delete(ctx context.Context, accountIdentifier interface{}, identifier string, opts ...option.RequestOption) (res *AccountMemberDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/members/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Add a user to the list of members for this account. +func (r *AccountMemberService) AccountMembersAddMember(ctx context.Context, accountIdentifier interface{}, body AccountMemberAccountMembersAddMemberParams, opts ...option.RequestOption) (res *AccountMemberAccountMembersAddMemberResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/members", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// List all members of an account. +func (r *AccountMemberService) AccountMembersListMembers(ctx context.Context, accountIdentifier interface{}, query AccountMemberAccountMembersListMembersParams, opts ...option.RequestOption) (res *AccountMemberAccountMembersListMembersResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%v/members", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type AccountMemberGetResponse struct { + Errors []AccountMemberGetResponseError `json:"errors"` + Messages []AccountMemberGetResponseMessage `json:"messages"` + Result AccountMemberGetResponseResult `json:"result"` + // Whether the API call was successful + Success AccountMemberGetResponseSuccess `json:"success"` + JSON accountMemberGetResponseJSON `json:"-"` +} + +// accountMemberGetResponseJSON contains the JSON metadata for the struct +// [AccountMemberGetResponse] +type accountMemberGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberGetResponseErrorJSON `json:"-"` +} + +// accountMemberGetResponseErrorJSON contains the JSON metadata for the struct +// [AccountMemberGetResponseError] +type accountMemberGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberGetResponseMessageJSON `json:"-"` +} + +// accountMemberGetResponseMessageJSON contains the JSON metadata for the struct +// [AccountMemberGetResponseMessage] +type accountMemberGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResult struct { + // Membership identifier tag. + ID string `json:"id,required"` + // Roles assigned to this member. + Roles []AccountMemberGetResponseResultRole `json:"roles,required"` + Status interface{} `json:"status,required"` + User AccountMemberGetResponseResultUser `json:"user,required"` + JSON accountMemberGetResponseResultJSON `json:"-"` +} + +// accountMemberGetResponseResultJSON contains the JSON metadata for the struct +// [AccountMemberGetResponseResult] +type accountMemberGetResponseResultJSON struct { + ID apijson.Field + Roles apijson.Field + Status apijson.Field + User apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRole struct { + // Role identifier tag. + ID string `json:"id,required"` + // Description of role's permissions. + Description string `json:"description,required"` + // Role name. + Name string `json:"name,required"` + Permissions AccountMemberGetResponseResultRolesPermissions `json:"permissions,required"` + JSON accountMemberGetResponseResultRoleJSON `json:"-"` +} + +// accountMemberGetResponseResultRoleJSON contains the JSON metadata for the struct +// [AccountMemberGetResponseResultRole] +type accountMemberGetResponseResultRoleJSON struct { + ID apijson.Field + Description apijson.Field + Name apijson.Field + Permissions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRole) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissions struct { + Analytics AccountMemberGetResponseResultRolesPermissionsAnalytics `json:"analytics"` + Billing AccountMemberGetResponseResultRolesPermissionsBilling `json:"billing"` + CachePurge AccountMemberGetResponseResultRolesPermissionsCachePurge `json:"cache_purge"` + DNS AccountMemberGetResponseResultRolesPermissionsDNS `json:"dns"` + DNSRecords AccountMemberGetResponseResultRolesPermissionsDNSRecords `json:"dns_records"` + Lb AccountMemberGetResponseResultRolesPermissionsLb `json:"lb"` + Logs AccountMemberGetResponseResultRolesPermissionsLogs `json:"logs"` + Organization AccountMemberGetResponseResultRolesPermissionsOrganization `json:"organization"` + SSL AccountMemberGetResponseResultRolesPermissionsSSL `json:"ssl"` + WAF AccountMemberGetResponseResultRolesPermissionsWAF `json:"waf"` + ZoneSettings AccountMemberGetResponseResultRolesPermissionsZoneSettings `json:"zone_settings"` + Zones AccountMemberGetResponseResultRolesPermissionsZones `json:"zones"` + JSON accountMemberGetResponseResultRolesPermissionsJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsJSON contains the JSON metadata +// for the struct [AccountMemberGetResponseResultRolesPermissions] +type accountMemberGetResponseResultRolesPermissionsJSON struct { + Analytics apijson.Field + Billing apijson.Field + CachePurge apijson.Field + DNS apijson.Field + DNSRecords apijson.Field + Lb apijson.Field + Logs apijson.Field + Organization apijson.Field + SSL apijson.Field + WAF apijson.Field + ZoneSettings apijson.Field + Zones apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsAnalytics struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsAnalyticsJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsAnalyticsJSON contains the JSON +// metadata for the struct +// [AccountMemberGetResponseResultRolesPermissionsAnalytics] +type accountMemberGetResponseResultRolesPermissionsAnalyticsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsAnalytics) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsBilling struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsBillingJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsBillingJSON contains the JSON +// metadata for the struct [AccountMemberGetResponseResultRolesPermissionsBilling] +type accountMemberGetResponseResultRolesPermissionsBillingJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsBilling) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsCachePurge struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsCachePurgeJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsCachePurgeJSON contains the JSON +// metadata for the struct +// [AccountMemberGetResponseResultRolesPermissionsCachePurge] +type accountMemberGetResponseResultRolesPermissionsCachePurgeJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsCachePurge) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsDNS struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsDNSJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsDNSJSON contains the JSON metadata +// for the struct [AccountMemberGetResponseResultRolesPermissionsDNS] +type accountMemberGetResponseResultRolesPermissionsDNSJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsDNS) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsDNSRecords struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsDNSRecordsJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsDNSRecordsJSON contains the JSON +// metadata for the struct +// [AccountMemberGetResponseResultRolesPermissionsDNSRecords] +type accountMemberGetResponseResultRolesPermissionsDNSRecordsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsDNSRecords) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsLb struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsLbJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsLbJSON contains the JSON metadata +// for the struct [AccountMemberGetResponseResultRolesPermissionsLb] +type accountMemberGetResponseResultRolesPermissionsLbJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsLb) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsLogs struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsLogsJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsLogsJSON contains the JSON +// metadata for the struct [AccountMemberGetResponseResultRolesPermissionsLogs] +type accountMemberGetResponseResultRolesPermissionsLogsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsLogs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsOrganization struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsOrganizationJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsOrganizationJSON contains the JSON +// metadata for the struct +// [AccountMemberGetResponseResultRolesPermissionsOrganization] +type accountMemberGetResponseResultRolesPermissionsOrganizationJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsSSL struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsSSLJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsSSLJSON contains the JSON metadata +// for the struct [AccountMemberGetResponseResultRolesPermissionsSSL] +type accountMemberGetResponseResultRolesPermissionsSSLJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsSSL) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsWAF struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsWAFJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsWAFJSON contains the JSON metadata +// for the struct [AccountMemberGetResponseResultRolesPermissionsWAF] +type accountMemberGetResponseResultRolesPermissionsWAFJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsWAF) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsZoneSettings struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsZoneSettingsJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsZoneSettingsJSON contains the JSON +// metadata for the struct +// [AccountMemberGetResponseResultRolesPermissionsZoneSettings] +type accountMemberGetResponseResultRolesPermissionsZoneSettingsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsZoneSettings) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultRolesPermissionsZones struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberGetResponseResultRolesPermissionsZonesJSON `json:"-"` +} + +// accountMemberGetResponseResultRolesPermissionsZonesJSON contains the JSON +// metadata for the struct [AccountMemberGetResponseResultRolesPermissionsZones] +type accountMemberGetResponseResultRolesPermissionsZonesJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultRolesPermissionsZones) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberGetResponseResultUser struct { + // The contact email address of the user. + Email string `json:"email,required"` + // Identifier + ID string `json:"id"` + // User's first name + FirstName string `json:"first_name,nullable"` + // User's last name + LastName string `json:"last_name,nullable"` + // Indicates whether two-factor authentication is enabled for the user account. + // Does not apply to API authentication. + TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"` + JSON accountMemberGetResponseResultUserJSON `json:"-"` +} + +// accountMemberGetResponseResultUserJSON contains the JSON metadata for the struct +// [AccountMemberGetResponseResultUser] +type accountMemberGetResponseResultUserJSON struct { + Email apijson.Field + ID apijson.Field + FirstName apijson.Field + LastName apijson.Field + TwoFactorAuthenticationEnabled apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberGetResponseResultUser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountMemberGetResponseSuccess bool + +const ( + AccountMemberGetResponseSuccessTrue AccountMemberGetResponseSuccess = true +) + +type AccountMemberUpdateResponse struct { + Errors []AccountMemberUpdateResponseError `json:"errors"` + Messages []AccountMemberUpdateResponseMessage `json:"messages"` + Result AccountMemberUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success AccountMemberUpdateResponseSuccess `json:"success"` + JSON accountMemberUpdateResponseJSON `json:"-"` +} + +// accountMemberUpdateResponseJSON contains the JSON metadata for the struct +// [AccountMemberUpdateResponse] +type accountMemberUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberUpdateResponseErrorJSON `json:"-"` +} + +// accountMemberUpdateResponseErrorJSON contains the JSON metadata for the struct +// [AccountMemberUpdateResponseError] +type accountMemberUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberUpdateResponseMessageJSON `json:"-"` +} + +// accountMemberUpdateResponseMessageJSON contains the JSON metadata for the struct +// [AccountMemberUpdateResponseMessage] +type accountMemberUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResult struct { + // Membership identifier tag. + ID string `json:"id,required"` + // Roles assigned to this member. + Roles []AccountMemberUpdateResponseResultRole `json:"roles,required"` + Status interface{} `json:"status,required"` + User AccountMemberUpdateResponseResultUser `json:"user,required"` + JSON accountMemberUpdateResponseResultJSON `json:"-"` +} + +// accountMemberUpdateResponseResultJSON contains the JSON metadata for the struct +// [AccountMemberUpdateResponseResult] +type accountMemberUpdateResponseResultJSON struct { + ID apijson.Field + Roles apijson.Field + Status apijson.Field + User apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRole struct { + // Role identifier tag. + ID string `json:"id,required"` + // Description of role's permissions. + Description string `json:"description,required"` + // Role name. + Name string `json:"name,required"` + Permissions AccountMemberUpdateResponseResultRolesPermissions `json:"permissions,required"` + JSON accountMemberUpdateResponseResultRoleJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRoleJSON contains the JSON metadata for the +// struct [AccountMemberUpdateResponseResultRole] +type accountMemberUpdateResponseResultRoleJSON struct { + ID apijson.Field + Description apijson.Field + Name apijson.Field + Permissions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRole) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissions struct { + Analytics AccountMemberUpdateResponseResultRolesPermissionsAnalytics `json:"analytics"` + Billing AccountMemberUpdateResponseResultRolesPermissionsBilling `json:"billing"` + CachePurge AccountMemberUpdateResponseResultRolesPermissionsCachePurge `json:"cache_purge"` + DNS AccountMemberUpdateResponseResultRolesPermissionsDNS `json:"dns"` + DNSRecords AccountMemberUpdateResponseResultRolesPermissionsDNSRecords `json:"dns_records"` + Lb AccountMemberUpdateResponseResultRolesPermissionsLb `json:"lb"` + Logs AccountMemberUpdateResponseResultRolesPermissionsLogs `json:"logs"` + Organization AccountMemberUpdateResponseResultRolesPermissionsOrganization `json:"organization"` + SSL AccountMemberUpdateResponseResultRolesPermissionsSSL `json:"ssl"` + WAF AccountMemberUpdateResponseResultRolesPermissionsWAF `json:"waf"` + ZoneSettings AccountMemberUpdateResponseResultRolesPermissionsZoneSettings `json:"zone_settings"` + Zones AccountMemberUpdateResponseResultRolesPermissionsZones `json:"zones"` + JSON accountMemberUpdateResponseResultRolesPermissionsJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsJSON contains the JSON metadata +// for the struct [AccountMemberUpdateResponseResultRolesPermissions] +type accountMemberUpdateResponseResultRolesPermissionsJSON struct { + Analytics apijson.Field + Billing apijson.Field + CachePurge apijson.Field + DNS apijson.Field + DNSRecords apijson.Field + Lb apijson.Field + Logs apijson.Field + Organization apijson.Field + SSL apijson.Field + WAF apijson.Field + ZoneSettings apijson.Field + Zones apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsAnalytics struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsAnalyticsJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsAnalyticsJSON contains the JSON +// metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsAnalytics] +type accountMemberUpdateResponseResultRolesPermissionsAnalyticsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsAnalytics) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsBilling struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsBillingJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsBillingJSON contains the JSON +// metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsBilling] +type accountMemberUpdateResponseResultRolesPermissionsBillingJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsBilling) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsCachePurge struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsCachePurgeJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsCachePurgeJSON contains the +// JSON metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsCachePurge] +type accountMemberUpdateResponseResultRolesPermissionsCachePurgeJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsCachePurge) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsDNS struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsDNSJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsDNSJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsDNS] +type accountMemberUpdateResponseResultRolesPermissionsDNSJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsDNS) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsDNSRecords struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsDNSRecordsJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsDNSRecordsJSON contains the +// JSON metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsDNSRecords] +type accountMemberUpdateResponseResultRolesPermissionsDNSRecordsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsDNSRecords) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsLb struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsLbJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsLbJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsLb] +type accountMemberUpdateResponseResultRolesPermissionsLbJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsLb) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsLogs struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsLogsJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsLogsJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsLogs] +type accountMemberUpdateResponseResultRolesPermissionsLogsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsLogs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsOrganization struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsOrganizationJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsOrganizationJSON contains the +// JSON metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsOrganization] +type accountMemberUpdateResponseResultRolesPermissionsOrganizationJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsSSL struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsSSLJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsSSLJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsSSL] +type accountMemberUpdateResponseResultRolesPermissionsSSLJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsSSL) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsWAF struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsWAFJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsWAFJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsWAF] +type accountMemberUpdateResponseResultRolesPermissionsWAFJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsWAF) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsZoneSettings struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsZoneSettingsJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsZoneSettingsJSON contains the +// JSON metadata for the struct +// [AccountMemberUpdateResponseResultRolesPermissionsZoneSettings] +type accountMemberUpdateResponseResultRolesPermissionsZoneSettingsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsZoneSettings) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultRolesPermissionsZones struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberUpdateResponseResultRolesPermissionsZonesJSON `json:"-"` +} + +// accountMemberUpdateResponseResultRolesPermissionsZonesJSON contains the JSON +// metadata for the struct [AccountMemberUpdateResponseResultRolesPermissionsZones] +type accountMemberUpdateResponseResultRolesPermissionsZonesJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultRolesPermissionsZones) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberUpdateResponseResultUser struct { + // The contact email address of the user. + Email string `json:"email,required"` + // Identifier + ID string `json:"id"` + // User's first name + FirstName string `json:"first_name,nullable"` + // User's last name + LastName string `json:"last_name,nullable"` + // Indicates whether two-factor authentication is enabled for the user account. + // Does not apply to API authentication. + TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"` + JSON accountMemberUpdateResponseResultUserJSON `json:"-"` +} + +// accountMemberUpdateResponseResultUserJSON contains the JSON metadata for the +// struct [AccountMemberUpdateResponseResultUser] +type accountMemberUpdateResponseResultUserJSON struct { + Email apijson.Field + ID apijson.Field + FirstName apijson.Field + LastName apijson.Field + TwoFactorAuthenticationEnabled apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberUpdateResponseResultUser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountMemberUpdateResponseSuccess bool + +const ( + AccountMemberUpdateResponseSuccessTrue AccountMemberUpdateResponseSuccess = true +) + +type AccountMemberDeleteResponse struct { + Errors []AccountMemberDeleteResponseError `json:"errors"` + Messages []AccountMemberDeleteResponseMessage `json:"messages"` + Result AccountMemberDeleteResponseResult `json:"result,nullable"` + // Whether the API call was successful + Success AccountMemberDeleteResponseSuccess `json:"success"` + JSON accountMemberDeleteResponseJSON `json:"-"` +} + +// accountMemberDeleteResponseJSON contains the JSON metadata for the struct +// [AccountMemberDeleteResponse] +type accountMemberDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberDeleteResponseErrorJSON `json:"-"` +} + +// accountMemberDeleteResponseErrorJSON contains the JSON metadata for the struct +// [AccountMemberDeleteResponseError] +type accountMemberDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberDeleteResponseMessageJSON `json:"-"` +} + +// accountMemberDeleteResponseMessageJSON contains the JSON metadata for the struct +// [AccountMemberDeleteResponseMessage] +type accountMemberDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberDeleteResponseResult struct { + // Identifier + ID string `json:"id,required"` + JSON accountMemberDeleteResponseResultJSON `json:"-"` +} + +// accountMemberDeleteResponseResultJSON contains the JSON metadata for the struct +// [AccountMemberDeleteResponseResult] +type accountMemberDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountMemberDeleteResponseSuccess bool + +const ( + AccountMemberDeleteResponseSuccessTrue AccountMemberDeleteResponseSuccess = true +) + +type AccountMemberAccountMembersAddMemberResponse struct { + Errors []AccountMemberAccountMembersAddMemberResponseError `json:"errors"` + Messages []AccountMemberAccountMembersAddMemberResponseMessage `json:"messages"` + Result AccountMemberAccountMembersAddMemberResponseResult `json:"result"` + // Whether the API call was successful + Success AccountMemberAccountMembersAddMemberResponseSuccess `json:"success"` + JSON accountMemberAccountMembersAddMemberResponseJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseJSON contains the JSON metadata for +// the struct [AccountMemberAccountMembersAddMemberResponse] +type accountMemberAccountMembersAddMemberResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberAccountMembersAddMemberResponseErrorJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseErrorJSON contains the JSON metadata +// for the struct [AccountMemberAccountMembersAddMemberResponseError] +type accountMemberAccountMembersAddMemberResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberAccountMembersAddMemberResponseMessageJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseMessageJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersAddMemberResponseMessage] +type accountMemberAccountMembersAddMemberResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResult struct { + // Membership identifier tag. + ID string `json:"id"` + // The unique activation code for the account membership. + Code string `json:"code"` + // Roles assigned to this member. + Roles []AccountMemberAccountMembersAddMemberResponseResultRole `json:"roles"` + Status interface{} `json:"status"` + User AccountMemberAccountMembersAddMemberResponseResultUser `json:"user"` + JSON accountMemberAccountMembersAddMemberResponseResultJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersAddMemberResponseResult] +type accountMemberAccountMembersAddMemberResponseResultJSON struct { + ID apijson.Field + Code apijson.Field + Roles apijson.Field + Status apijson.Field + User apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRole struct { + // Role identifier tag. + ID string `json:"id,required"` + // Description of role's permissions. + Description string `json:"description,required"` + // Role name. + Name string `json:"name,required"` + Permissions AccountMemberAccountMembersAddMemberResponseResultRolesPermissions `json:"permissions,required"` + JSON accountMemberAccountMembersAddMemberResponseResultRoleJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRoleJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersAddMemberResponseResultRole] +type accountMemberAccountMembersAddMemberResponseResultRoleJSON struct { + ID apijson.Field + Description apijson.Field + Name apijson.Field + Permissions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRole) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissions struct { + Analytics AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalytics `json:"analytics"` + Billing AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsBilling `json:"billing"` + CachePurge AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurge `json:"cache_purge"` + DNS AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNS `json:"dns"` + DNSRecords AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecords `json:"dns_records"` + Lb AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLb `json:"lb"` + Logs AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogs `json:"logs"` + Organization AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganization `json:"organization"` + SSL AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSL `json:"ssl"` + WAF AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAF `json:"waf"` + ZoneSettings AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettings `json:"zone_settings"` + Zones AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZones `json:"zones"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsJSON contains +// the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissions] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsJSON struct { + Analytics apijson.Field + Billing apijson.Field + CachePurge apijson.Field + DNS apijson.Field + DNSRecords apijson.Field + Lb apijson.Field + Logs apijson.Field + Organization apijson.Field + SSL apijson.Field + WAF apijson.Field + ZoneSettings apijson.Field + Zones apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalytics struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalyticsJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalyticsJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalytics] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalyticsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsAnalytics) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsBilling struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsBillingJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsBillingJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsBilling] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsBillingJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsBilling) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurge struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurgeJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurgeJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurge] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurgeJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsCachePurge) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNS struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNS] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNS) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecords struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecordsJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecordsJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecords] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecordsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsDNSRecords) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLb struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLbJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLbJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLb] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLbJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLb) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogs struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogsJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogsJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogs] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsLogs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganization struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganizationJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganizationJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganization] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganizationJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsOrganization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSL struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSLJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSLJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSL] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSLJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsSSL) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAF struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAFJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAFJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAF] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAFJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsWAF) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettings struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettingsJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettingsJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettings] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettingsJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZoneSettings) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZones struct { + Read bool `json:"read"` + Write bool `json:"write"` + JSON accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZonesJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZonesJSON +// contains the JSON metadata for the struct +// [AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZones] +type accountMemberAccountMembersAddMemberResponseResultRolesPermissionsZonesJSON struct { + Read apijson.Field + Write apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultRolesPermissionsZones) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersAddMemberResponseResultUser struct { + // The contact email address of the user. + Email string `json:"email,required"` + // Identifier + ID string `json:"id"` + // User's first name + FirstName string `json:"first_name,nullable"` + // User's last name + LastName string `json:"last_name,nullable"` + // Indicates whether two-factor authentication is enabled for the user account. + // Does not apply to API authentication. + TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"` + JSON accountMemberAccountMembersAddMemberResponseResultUserJSON `json:"-"` +} + +// accountMemberAccountMembersAddMemberResponseResultUserJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersAddMemberResponseResultUser] +type accountMemberAccountMembersAddMemberResponseResultUserJSON struct { + Email apijson.Field + ID apijson.Field + FirstName apijson.Field + LastName apijson.Field + TwoFactorAuthenticationEnabled apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersAddMemberResponseResultUser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountMemberAccountMembersAddMemberResponseSuccess bool + +const ( + AccountMemberAccountMembersAddMemberResponseSuccessTrue AccountMemberAccountMembersAddMemberResponseSuccess = true +) + +type AccountMemberAccountMembersListMembersResponse struct { + Errors []AccountMemberAccountMembersListMembersResponseError `json:"errors"` + Messages []AccountMemberAccountMembersListMembersResponseMessage `json:"messages"` + Result []AccountMemberAccountMembersListMembersResponseResult `json:"result"` + ResultInfo AccountMemberAccountMembersListMembersResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success AccountMemberAccountMembersListMembersResponseSuccess `json:"success"` + JSON accountMemberAccountMembersListMembersResponseJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseJSON contains the JSON metadata +// for the struct [AccountMemberAccountMembersListMembersResponse] +type accountMemberAccountMembersListMembersResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersListMembersResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberAccountMembersListMembersResponseErrorJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseErrorJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersListMembersResponseError] +type accountMemberAccountMembersListMembersResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersListMembersResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON accountMemberAccountMembersListMembersResponseMessageJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseMessageJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersListMembersResponseMessage] +type accountMemberAccountMembersListMembersResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersListMembersResponseResult struct { + // Identifier + ID string `json:"id,required"` + // The contact email address of the user. + Email string `json:"email,required"` + // Member Name. + Name string `json:"name,required,nullable"` + // Roles assigned to this Member. + Roles []AccountMemberAccountMembersListMembersResponseResultRole `json:"roles,required"` + // A member's status in the organization. + Status AccountMemberAccountMembersListMembersResponseResultStatus `json:"status,required"` + JSON accountMemberAccountMembersListMembersResponseResultJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseResultJSON contains the JSON +// metadata for the struct [AccountMemberAccountMembersListMembersResponseResult] +type accountMemberAccountMembersListMembersResponseResultJSON struct { + ID apijson.Field + Email apijson.Field + Name apijson.Field + Roles apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type AccountMemberAccountMembersListMembersResponseResultRole struct { + // Role identifier tag. + ID string `json:"id,required"` + // Description of role's permissions. + Description string `json:"description,required"` + // Role Name. + Name string `json:"name,required"` + // Access permissions for this User. + Permissions []string `json:"permissions,required"` + JSON accountMemberAccountMembersListMembersResponseResultRoleJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseResultRoleJSON contains the JSON +// metadata for the struct +// [AccountMemberAccountMembersListMembersResponseResultRole] +type accountMemberAccountMembersListMembersResponseResultRoleJSON struct { + ID apijson.Field + Description apijson.Field + Name apijson.Field + Permissions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponseResultRole) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A member's status in the organization. +type AccountMemberAccountMembersListMembersResponseResultStatus string + +const ( + AccountMemberAccountMembersListMembersResponseResultStatusAccepted AccountMemberAccountMembersListMembersResponseResultStatus = "accepted" + AccountMemberAccountMembersListMembersResponseResultStatusInvited AccountMemberAccountMembersListMembersResponseResultStatus = "invited" +) + +type AccountMemberAccountMembersListMembersResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON accountMemberAccountMembersListMembersResponseResultInfoJSON `json:"-"` +} + +// accountMemberAccountMembersListMembersResponseResultInfoJSON contains the JSON +// metadata for the struct +// [AccountMemberAccountMembersListMembersResponseResultInfo] +type accountMemberAccountMembersListMembersResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AccountMemberAccountMembersListMembersResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type AccountMemberAccountMembersListMembersResponseSuccess bool + +const ( + AccountMemberAccountMembersListMembersResponseSuccessTrue AccountMemberAccountMembersListMembersResponseSuccess = true +) + +type AccountMemberUpdateParams struct { + // Roles assigned to this member. + Roles param.Field[[]AccountMemberUpdateParamsRole] `json:"roles,required"` +} + +func (r AccountMemberUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRole struct { + // Role identifier tag. + ID param.Field[string] `json:"id,required"` + Permissions param.Field[AccountMemberUpdateParamsRolesPermissions] `json:"permissions,required"` +} + +func (r AccountMemberUpdateParamsRole) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissions struct { + Analytics param.Field[AccountMemberUpdateParamsRolesPermissionsAnalytics] `json:"analytics"` + Billing param.Field[AccountMemberUpdateParamsRolesPermissionsBilling] `json:"billing"` + CachePurge param.Field[AccountMemberUpdateParamsRolesPermissionsCachePurge] `json:"cache_purge"` + DNS param.Field[AccountMemberUpdateParamsRolesPermissionsDNS] `json:"dns"` + DNSRecords param.Field[AccountMemberUpdateParamsRolesPermissionsDNSRecords] `json:"dns_records"` + Lb param.Field[AccountMemberUpdateParamsRolesPermissionsLb] `json:"lb"` + Logs param.Field[AccountMemberUpdateParamsRolesPermissionsLogs] `json:"logs"` + Organization param.Field[AccountMemberUpdateParamsRolesPermissionsOrganization] `json:"organization"` + SSL param.Field[AccountMemberUpdateParamsRolesPermissionsSSL] `json:"ssl"` + WAF param.Field[AccountMemberUpdateParamsRolesPermissionsWAF] `json:"waf"` + ZoneSettings param.Field[AccountMemberUpdateParamsRolesPermissionsZoneSettings] `json:"zone_settings"` + Zones param.Field[AccountMemberUpdateParamsRolesPermissionsZones] `json:"zones"` +} + +func (r AccountMemberUpdateParamsRolesPermissions) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsAnalytics struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsAnalytics) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsBilling struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsBilling) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsCachePurge struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsCachePurge) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsDNS struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsDNS) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsDNSRecords struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsDNSRecords) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsLb struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsLb) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsLogs struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsLogs) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsOrganization struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsOrganization) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsSSL struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsSSL) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsWAF struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsWAF) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsZoneSettings struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsZoneSettings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberUpdateParamsRolesPermissionsZones struct { + Read param.Field[bool] `json:"read"` + Write param.Field[bool] `json:"write"` +} + +func (r AccountMemberUpdateParamsRolesPermissionsZones) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberAccountMembersAddMemberParams struct { + // The contact email address of the user. + Email param.Field[string] `json:"email,required"` + // Array of roles associated with this member. + Roles param.Field[[]string] `json:"roles,required"` + Status param.Field[AccountMemberAccountMembersAddMemberParamsStatus] `json:"status"` +} + +func (r AccountMemberAccountMembersAddMemberParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AccountMemberAccountMembersAddMemberParamsStatus string + +const ( + AccountMemberAccountMembersAddMemberParamsStatusAccepted AccountMemberAccountMembersAddMemberParamsStatus = "accepted" + AccountMemberAccountMembersAddMemberParamsStatusPending AccountMemberAccountMembersAddMemberParamsStatus = "pending" +) + +type AccountMemberAccountMembersListMembersParams struct { + // Direction to order results. + Direction param.Field[AccountMemberAccountMembersListMembersParamsDirection] `query:"direction"` + // Field to order results by. + Order param.Field[AccountMemberAccountMembersListMembersParamsOrder] `query:"order"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Maximum number of results per page. + PerPage param.Field[float64] `query:"per_page"` + // A member's status in the account. + Status param.Field[AccountMemberAccountMembersListMembersParamsStatus] `query:"status"` +} + +// URLQuery serializes [AccountMemberAccountMembersListMembersParams]'s query +// parameters as `url.Values`. +func (r AccountMemberAccountMembersListMembersParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Direction to order results. +type AccountMemberAccountMembersListMembersParamsDirection string + +const ( + AccountMemberAccountMembersListMembersParamsDirectionAsc AccountMemberAccountMembersListMembersParamsDirection = "asc" + AccountMemberAccountMembersListMembersParamsDirectionDesc AccountMemberAccountMembersListMembersParamsDirection = "desc" +) + +// Field to order results by. +type AccountMemberAccountMembersListMembersParamsOrder string + +const ( + AccountMemberAccountMembersListMembersParamsOrderUserFirstName AccountMemberAccountMembersListMembersParamsOrder = "user.first_name" + AccountMemberAccountMembersListMembersParamsOrderUserLastName AccountMemberAccountMembersListMembersParamsOrder = "user.last_name" + AccountMemberAccountMembersListMembersParamsOrderUserEmail AccountMemberAccountMembersListMembersParamsOrder = "user.email" + AccountMemberAccountMembersListMembersParamsOrderStatus AccountMemberAccountMembersListMembersParamsOrder = "status" +) + +// A member's status in the account. +type AccountMemberAccountMembersListMembersParamsStatus string + +const ( + AccountMemberAccountMembersListMembersParamsStatusAccepted AccountMemberAccountMembersListMembersParamsStatus = "accepted" + AccountMemberAccountMembersListMembersParamsStatusPending AccountMemberAccountMembersListMembersParamsStatus = "pending" + AccountMemberAccountMembersListMembersParamsStatusRejected AccountMemberAccountMembersListMembersParamsStatus = "rejected" +) diff --git a/accountmember_test.go b/accountmember_test.go new file mode 100644 index 00000000000..69e250563e9 --- /dev/null +++ b/accountmember_test.go @@ -0,0 +1,333 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestAccountMemberGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.AccountMembers.Get( + context.TODO(), + map[string]interface{}{}, + "4536bcfad5faccb111b47003c79917fa", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountMemberUpdate(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.AccountMembers.Update( + context.TODO(), + map[string]interface{}{}, + "4536bcfad5faccb111b47003c79917fa", + cloudflare.AccountMemberUpdateParams{ + Roles: cloudflare.F([]cloudflare.AccountMemberUpdateParamsRole{{ + ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"), + Permissions: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissions{ + Analytics: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsAnalytics{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Billing: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsBilling{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + CachePurge: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsCachePurge{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNS: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNS{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNSRecords: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNSRecords{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Lb: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLb{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Logs: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLogs{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Organization: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsOrganization{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + SSL: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsSSL{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + WAF: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsWAF{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + ZoneSettings: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZoneSettings{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Zones: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZones{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + }), + }, { + ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"), + Permissions: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissions{ + Analytics: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsAnalytics{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Billing: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsBilling{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + CachePurge: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsCachePurge{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNS: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNS{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNSRecords: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNSRecords{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Lb: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLb{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Logs: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLogs{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Organization: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsOrganization{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + SSL: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsSSL{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + WAF: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsWAF{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + ZoneSettings: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZoneSettings{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Zones: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZones{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + }), + }, { + ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"), + Permissions: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissions{ + Analytics: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsAnalytics{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Billing: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsBilling{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + CachePurge: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsCachePurge{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNS: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNS{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + DNSRecords: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsDNSRecords{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Lb: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLb{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Logs: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsLogs{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Organization: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsOrganization{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + SSL: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsSSL{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + WAF: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsWAF{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + ZoneSettings: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZoneSettings{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + Zones: cloudflare.F(cloudflare.AccountMemberUpdateParamsRolesPermissionsZones{ + Read: cloudflare.F(true), + Write: cloudflare.F(false), + }), + }), + }}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountMemberDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.AccountMembers.Delete( + context.TODO(), + map[string]interface{}{}, + "4536bcfad5faccb111b47003c79917fa", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountMemberAccountMembersAddMemberWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.AccountMembers.AccountMembersAddMember( + context.TODO(), + map[string]interface{}{}, + cloudflare.AccountMemberAccountMembersAddMemberParams{ + Email: cloudflare.F("user@example.com"), + Roles: cloudflare.F([]string{"3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb"}), + Status: cloudflare.F(cloudflare.AccountMemberAccountMembersAddMemberParamsStatusAccepted), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAccountMemberAccountMembersListMembersWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.AccountMembers.AccountMembersListMembers( + context.TODO(), + map[string]interface{}{}, + cloudflare.AccountMemberAccountMembersListMembersParams{ + Direction: cloudflare.F(cloudflare.AccountMemberAccountMembersListMembersParamsDirectionDesc), + Order: cloudflare.F(cloudflare.AccountMemberAccountMembersListMembersParamsOrderStatus), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(5.000000), + Status: cloudflare.F(cloudflare.AccountMemberAccountMembersListMembersParamsStatusAccepted), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/ai_test.go b/ai_test.go index 39805a715ce..e9a81f4774a 100644 --- a/ai_test.go +++ b/ai_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIRun(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIRun(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Run( context.TODO(), diff --git a/aibaai_test.go b/aibaai_test.go index 44786a10900..bf62ec9fe66 100644 --- a/aibaai_test.go +++ b/aibaai_test.go @@ -15,6 +15,7 @@ import ( ) func TestAIBaaiBgeBaseEnV1_5(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -25,8 +26,9 @@ func TestAIBaaiBgeBaseEnV1_5(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Baai.BgeBaseEnV1_5( context.TODO(), @@ -45,6 +47,7 @@ func TestAIBaaiBgeBaseEnV1_5(t *testing.T) { } func TestAIBaaiBgeLargeEnV1_5(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,8 +58,9 @@ func TestAIBaaiBgeLargeEnV1_5(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Baai.BgeLargeEnV1_5( context.TODO(), @@ -75,6 +79,7 @@ func TestAIBaaiBgeLargeEnV1_5(t *testing.T) { } func TestAIBaaiBgeSmallEnV1_5(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -85,8 +90,9 @@ func TestAIBaaiBgeSmallEnV1_5(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Baai.BgeSmallEnV1_5( context.TODO(), diff --git a/aihuggingface_test.go b/aihuggingface_test.go index f80ec814e33..1896e71c759 100644 --- a/aihuggingface_test.go +++ b/aihuggingface_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIHuggingfaceDistilbertSst2Int8(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIHuggingfaceDistilbertSst2Int8(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Huggingface.DistilbertSst2Int8( context.TODO(), diff --git a/aimeta_test.go b/aimeta_test.go index f15ad6482fd..da21c254390 100644 --- a/aimeta_test.go +++ b/aimeta_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIMetaLlama2_7bChatFp16WithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIMetaLlama2_7bChatFp16WithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Meta.Llama2_7bChatFp16( context.TODO(), @@ -45,6 +47,7 @@ func TestAIMetaLlama2_7bChatFp16WithOptionalParams(t *testing.T) { } func TestAIMetaLlama2_7bChatInt8WithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,8 +58,9 @@ func TestAIMetaLlama2_7bChatInt8WithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Meta.Llama2_7bChatInt8( context.TODO(), @@ -76,6 +80,7 @@ func TestAIMetaLlama2_7bChatInt8WithOptionalParams(t *testing.T) { } func TestAIMetaM2m100_1_2bWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,8 +91,9 @@ func TestAIMetaM2m100_1_2bWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Meta.M2m100_1_2b( context.TODO(), diff --git a/aimicrosoft_test.go b/aimicrosoft_test.go index d00fb57c5b8..98f0fe37953 100644 --- a/aimicrosoft_test.go +++ b/aimicrosoft_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIMicrosoftResnet50(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIMicrosoftResnet50(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Microsoft.Resnet50(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { diff --git a/aimistral_test.go b/aimistral_test.go index d38b4d37ea8..f5c72e31d19 100644 --- a/aimistral_test.go +++ b/aimistral_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIMistralMistral7bInstructV0_1WithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIMistralMistral7bInstructV0_1WithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.Mistral.Mistral7bInstructV0_1( context.TODO(), diff --git a/aiopenai_test.go b/aiopenai_test.go index 5d0b54b29d3..6341c52d5e3 100644 --- a/aiopenai_test.go +++ b/aiopenai_test.go @@ -14,6 +14,7 @@ import ( ) func TestAIOpenAIWhisper(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestAIOpenAIWhisper(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.AI.OpenAI.Whisper(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { diff --git a/api.md b/api.md index ab28d594591..b0e67a7d0f9 100644 --- a/api.md +++ b/api.md @@ -1,727 +1,691 @@ -# Zones - -Response Types: - -- cloudflare.ZoneNewResponse -- cloudflare.ZoneGetResponse -- cloudflare.ZoneUpdateResponse -- cloudflare.ZoneListResponse -- cloudflare.ZoneDeleteResponse - -Methods: - -- client.Zones.New(ctx context.Context, body cloudflare.ZoneNewParams) (cloudflare.ZoneNewResponse, error) -- client.Zones.Get(ctx context.Context, identifier string) (cloudflare.ZoneGetResponse, error) -- client.Zones.Update(ctx context.Context, identifier string, body cloudflare.ZoneUpdateParams) (cloudflare.ZoneUpdateResponse, error) -- client.Zones.List(ctx context.Context, query cloudflare.ZoneListParams) (cloudflare.ZoneListResponse, error) -- client.Zones.Delete(ctx context.Context, identifier string) (cloudflare.ZoneDeleteResponse, error) - -## LoadBalancers - -Response Types: - -- cloudflare.ZoneLoadBalancerNewResponse -- cloudflare.ZoneLoadBalancerGetResponse -- cloudflare.ZoneLoadBalancerUpdateResponse -- cloudflare.ZoneLoadBalancerListResponse -- cloudflare.ZoneLoadBalancerDeleteResponse - -Methods: - -- client.Zones.LoadBalancers.New(ctx context.Context, identifier string, body cloudflare.ZoneLoadBalancerNewParams) (cloudflare.ZoneLoadBalancerNewResponse, error) -- client.Zones.LoadBalancers.Get(ctx context.Context, identifier1 string, identifier string) (cloudflare.ZoneLoadBalancerGetResponse, error) -- client.Zones.LoadBalancers.Update(ctx context.Context, identifier1 string, identifier string, body cloudflare.ZoneLoadBalancerUpdateParams) (cloudflare.ZoneLoadBalancerUpdateResponse, error) -- client.Zones.LoadBalancers.List(ctx context.Context, identifier string) (cloudflare.ZoneLoadBalancerListResponse, error) -- client.Zones.LoadBalancers.Delete(ctx context.Context, identifier1 string, identifier string) (cloudflare.ZoneLoadBalancerDeleteResponse, error) - -## Dnssecs - -## RateLimits - -Response Types: - -- cloudflare.ZoneRateLimitGetResponse -- cloudflare.ZoneRateLimitListResponse - -Methods: - -- client.Zones.RateLimits.Get(ctx context.Context, zoneIdentifier string, id string) (cloudflare.ZoneRateLimitGetResponse, error) -- client.Zones.RateLimits.List(ctx context.Context, zoneIdentifier string, query cloudflare.ZoneRateLimitListParams) (cloudflare.ZoneRateLimitListResponse, error) - -## Settings +# Accounts Response Types: -- cloudflare.ZoneSettingListResponse -- cloudflare.ZoneSettingEditResponse +- cloudflare.AccountGetResponse +- cloudflare.AccountUpdateResponse +- cloudflare.AccountListResponse Methods: -- client.Zones.Settings.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingListResponse, error) -- client.Zones.Settings.Edit(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingEditParams) (cloudflare.ZoneSettingEditResponse, error) +- client.Accounts.Get(ctx context.Context, identifier interface{}) (cloudflare.AccountGetResponse, error) +- client.Accounts.Update(ctx context.Context, identifier interface{}, body cloudflare.AccountUpdateParams) (cloudflare.AccountUpdateResponse, error) +- client.Accounts.List(ctx context.Context, query cloudflare.AccountListParams) (cloudflare.AccountListResponse, error) -### AdvancedDDOS +# IPs Response Types: -- cloudflare.ZoneSettingAdvancedDDOSListResponse +- cloudflare.IPListResponse Methods: -- client.Zones.Settings.AdvancedDDOS.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingAdvancedDDOSListResponse, error) +- client.IPs.List(ctx context.Context, query cloudflare.IPListParams) (cloudflare.IPListResponse, error) -### AlwaysOnline +# Zones Response Types: -- cloudflare.ZoneSettingAlwaysOnlineGetResponse -- cloudflare.ZoneSettingAlwaysOnlineUpdateResponse +- cloudflare.ZoneNewResponse +- cloudflare.ZoneGetResponse +- cloudflare.ZoneUpdateResponse +- cloudflare.ZoneListResponse +- cloudflare.ZoneDeleteResponse Methods: -- client.Zones.Settings.AlwaysOnline.Get(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingAlwaysOnlineGetResponse, error) -- client.Zones.Settings.AlwaysOnline.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingAlwaysOnlineUpdateParams) (cloudflare.ZoneSettingAlwaysOnlineUpdateResponse, error) +- client.Zones.New(ctx context.Context, body cloudflare.ZoneNewParams) (cloudflare.ZoneNewResponse, error) +- client.Zones.Get(ctx context.Context, identifier string) (cloudflare.ZoneGetResponse, error) +- client.Zones.Update(ctx context.Context, identifier string, body cloudflare.ZoneUpdateParams) (cloudflare.ZoneUpdateResponse, error) +- client.Zones.List(ctx context.Context, query cloudflare.ZoneListParams) (cloudflare.ZoneListResponse, error) +- client.Zones.Delete(ctx context.Context, identifier string) (cloudflare.ZoneDeleteResponse, error) -### AlwaysUseHTTPs +# AI Response Types: -- cloudflare.ZoneSettingAlwaysUseHTTPUpdateResponse -- cloudflare.ZoneSettingAlwaysUseHTTPListResponse +- cloudflare.AIRunResponse Methods: -- client.Zones.Settings.AlwaysUseHTTPs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingAlwaysUseHTTPUpdateParams) (cloudflare.ZoneSettingAlwaysUseHTTPUpdateResponse, error) -- client.Zones.Settings.AlwaysUseHTTPs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingAlwaysUseHTTPListResponse, error) +- client.AI.Run(ctx context.Context, accountIdentifier string, modelName string, body cloudflare.AIRunParams) (cloudflare.AIRunResponse, error) -### AutomaticHTTPsRewrites +## Huggingface Response Types: -- cloudflare.ZoneSettingAutomaticHTTPsRewriteUpdateResponse -- cloudflare.ZoneSettingAutomaticHTTPsRewriteListResponse +- cloudflare.AIHuggingfaceDistilbertSst2Int8Response Methods: -- client.Zones.Settings.AutomaticHTTPsRewrites.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingAutomaticHTTPsRewriteUpdateParams) (cloudflare.ZoneSettingAutomaticHTTPsRewriteUpdateResponse, error) -- client.Zones.Settings.AutomaticHTTPsRewrites.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingAutomaticHTTPsRewriteListResponse, error) +- client.AI.Huggingface.DistilbertSst2Int8(ctx context.Context, accountIdentifier string, body cloudflare.AIHuggingfaceDistilbertSst2Int8Params) ([]cloudflare.AIHuggingfaceDistilbertSst2Int8Response, error) -### AutomaticPlatformOptimization +## Baai Response Types: -- cloudflare.ZoneSettingAutomaticPlatformOptimizationUpdateResponse -- cloudflare.ZoneSettingAutomaticPlatformOptimizationListResponse +- cloudflare.AIBaaiBgeBaseEnV1_5Response +- cloudflare.AIBaaiBgeLargeEnV1_5Response +- cloudflare.AIBaaiBgeSmallEnV1_5Response Methods: -- client.Zones.Settings.AutomaticPlatformOptimization.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingAutomaticPlatformOptimizationUpdateParams) (cloudflare.ZoneSettingAutomaticPlatformOptimizationUpdateResponse, error) -- client.Zones.Settings.AutomaticPlatformOptimization.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingAutomaticPlatformOptimizationListResponse, error) +- client.AI.Baai.BgeBaseEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeBaseEnV1_5Params) (cloudflare.AIBaaiBgeBaseEnV1_5Response, error) +- client.AI.Baai.BgeLargeEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeLargeEnV1_5Params) (cloudflare.AIBaaiBgeLargeEnV1_5Response, error) +- client.AI.Baai.BgeSmallEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeSmallEnV1_5Params) (cloudflare.AIBaaiBgeSmallEnV1_5Response, error) -### Brotli +## OpenAI Response Types: -- cloudflare.ZoneSettingBrotliUpdateResponse -- cloudflare.ZoneSettingBrotliListResponse +- cloudflare.AIOpenAIWhisperResponse Methods: -- client.Zones.Settings.Brotli.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingBrotliUpdateParams) (cloudflare.ZoneSettingBrotliUpdateResponse, error) -- client.Zones.Settings.Brotli.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingBrotliListResponse, error) +- client.AI.OpenAI.Whisper(ctx context.Context, accountIdentifier string) (cloudflare.AIOpenAIWhisperResponse, error) -### BrowserCacheTTLs +## Microsoft Response Types: -- cloudflare.ZoneSettingBrowserCacheTTLUpdateResponse -- cloudflare.ZoneSettingBrowserCacheTTLListResponse +- cloudflare.AIMicrosoftResnet50Response Methods: -- client.Zones.Settings.BrowserCacheTTLs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingBrowserCacheTTLUpdateParams) (cloudflare.ZoneSettingBrowserCacheTTLUpdateResponse, error) -- client.Zones.Settings.BrowserCacheTTLs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingBrowserCacheTTLListResponse, error) +- client.AI.Microsoft.Resnet50(ctx context.Context, accountIdentifier string) ([]cloudflare.AIMicrosoftResnet50Response, error) -### BrowserChecks +## Meta Response Types: -- cloudflare.ZoneSettingBrowserCheckUpdateResponse -- cloudflare.ZoneSettingBrowserCheckListResponse +- cloudflare.AIMetaLlama2_7bChatFp16Response +- cloudflare.AIMetaLlama2_7bChatInt8Response +- cloudflare.AIMetaM2m100_1_2bResponse Methods: -- client.Zones.Settings.BrowserChecks.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingBrowserCheckUpdateParams) (cloudflare.ZoneSettingBrowserCheckUpdateResponse, error) -- client.Zones.Settings.BrowserChecks.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingBrowserCheckListResponse, error) +- client.AI.Meta.Llama2_7bChatFp16(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaLlama2_7bChatFp16Params) (cloudflare.AIMetaLlama2_7bChatFp16Response, error) +- client.AI.Meta.Llama2_7bChatInt8(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaLlama2_7bChatInt8Params) (cloudflare.AIMetaLlama2_7bChatInt8Response, error) +- client.AI.Meta.M2m100_1_2b(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaM2m100_1_2bParams) (cloudflare.AIMetaM2m100_1_2bResponse, error) -### CacheLevels +## Mistral Response Types: -- cloudflare.ZoneSettingCacheLevelUpdateResponse -- cloudflare.ZoneSettingCacheLevelListResponse +- cloudflare.AIMistralMistral7bInstructV0_1Response Methods: -- client.Zones.Settings.CacheLevels.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingCacheLevelUpdateParams) (cloudflare.ZoneSettingCacheLevelUpdateResponse, error) -- client.Zones.Settings.CacheLevels.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingCacheLevelListResponse, error) +- client.AI.Mistral.Mistral7bInstructV0_1(ctx context.Context, accountIdentifier string, body cloudflare.AIMistralMistral7bInstructV0_1Params) (cloudflare.AIMistralMistral7bInstructV0_1Response, error) -### ChallengeTTLs +# LoadBalancers Response Types: -- cloudflare.ZoneSettingChallengeTTLUpdateResponse -- cloudflare.ZoneSettingChallengeTTLListResponse +- cloudflare.LoadBalancerNewResponse +- cloudflare.LoadBalancerGetResponse +- cloudflare.LoadBalancerUpdateResponse +- cloudflare.LoadBalancerListResponse +- cloudflare.LoadBalancerDeleteResponse Methods: -- client.Zones.Settings.ChallengeTTLs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingChallengeTTLUpdateParams) (cloudflare.ZoneSettingChallengeTTLUpdateResponse, error) -- client.Zones.Settings.ChallengeTTLs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingChallengeTTLListResponse, error) +- client.LoadBalancers.New(ctx context.Context, identifier string, body cloudflare.LoadBalancerNewParams) (cloudflare.LoadBalancerNewResponse, error) +- client.LoadBalancers.Get(ctx context.Context, identifier1 string, identifier string) (cloudflare.LoadBalancerGetResponse, error) +- client.LoadBalancers.Update(ctx context.Context, identifier1 string, identifier string, body cloudflare.LoadBalancerUpdateParams) (cloudflare.LoadBalancerUpdateResponse, error) +- client.LoadBalancers.List(ctx context.Context, identifier string) (cloudflare.LoadBalancerListResponse, error) +- client.LoadBalancers.Delete(ctx context.Context, identifier1 string, identifier string) (cloudflare.LoadBalancerDeleteResponse, error) -### Ciphers +## Monitors Response Types: -- cloudflare.ZoneSettingCipherUpdateResponse -- cloudflare.ZoneSettingCipherListResponse +- cloudflare.LoadBalancerMonitorGetResponse +- cloudflare.LoadBalancerMonitorUpdateResponse +- cloudflare.LoadBalancerMonitorDeleteResponse +- cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse +- cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse Methods: -- client.Zones.Settings.Ciphers.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingCipherUpdateParams) (cloudflare.ZoneSettingCipherUpdateResponse, error) -- client.Zones.Settings.Ciphers.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingCipherListResponse, error) +- client.LoadBalancers.Monitors.Get(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerMonitorGetResponse, error) +- client.LoadBalancers.Monitors.Update(ctx context.Context, accountIdentifier string, identifier string, body cloudflare.LoadBalancerMonitorUpdateParams) (cloudflare.LoadBalancerMonitorUpdateResponse, error) +- client.LoadBalancers.Monitors.Delete(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerMonitorDeleteResponse, error) +- client.LoadBalancers.Monitors.AccountLoadBalancerMonitorsNewMonitor(ctx context.Context, accountIdentifier string, body cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParams) (cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse, error) +- client.LoadBalancers.Monitors.AccountLoadBalancerMonitorsListMonitors(ctx context.Context, accountIdentifier string) (cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse, error) -### DevelopmentModes +### Previews Response Types: -- cloudflare.ZoneSettingDevelopmentModeUpdateResponse -- cloudflare.ZoneSettingDevelopmentModeListResponse +- cloudflare.LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse Methods: -- client.Zones.Settings.DevelopmentModes.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingDevelopmentModeUpdateParams) (cloudflare.ZoneSettingDevelopmentModeUpdateResponse, error) -- client.Zones.Settings.DevelopmentModes.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingDevelopmentModeListResponse, error) +- client.LoadBalancers.Monitors.Previews.AccountLoadBalancerMonitorsPreviewMonitor(ctx context.Context, accountIdentifier string, identifier string, body cloudflare.LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParams) (cloudflare.LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse, error) -### EarlyHints +### References Response Types: -- cloudflare.ZoneSettingEarlyHintUpdateResponse -- cloudflare.ZoneSettingEarlyHintListResponse +- cloudflare.LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse Methods: -- client.Zones.Settings.EarlyHints.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingEarlyHintUpdateParams) (cloudflare.ZoneSettingEarlyHintUpdateResponse, error) -- client.Zones.Settings.EarlyHints.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingEarlyHintListResponse, error) +- client.LoadBalancers.Monitors.References.AccountLoadBalancerMonitorsListMonitorReferences(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse, error) -### EmailObfuscations +## Pools Response Types: -- cloudflare.ZoneSettingEmailObfuscationUpdateResponse -- cloudflare.ZoneSettingEmailObfuscationListResponse +- cloudflare.LoadBalancerPoolGetResponse +- cloudflare.LoadBalancerPoolUpdateResponse +- cloudflare.LoadBalancerPoolDeleteResponse +- cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse +- cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse +- cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse Methods: -- client.Zones.Settings.EmailObfuscations.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingEmailObfuscationUpdateParams) (cloudflare.ZoneSettingEmailObfuscationUpdateResponse, error) -- client.Zones.Settings.EmailObfuscations.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingEmailObfuscationListResponse, error) +- client.LoadBalancers.Pools.Get(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerPoolGetResponse, error) +- client.LoadBalancers.Pools.Update(ctx context.Context, accountIdentifier string, identifier string, body cloudflare.LoadBalancerPoolUpdateParams) (cloudflare.LoadBalancerPoolUpdateResponse, error) +- client.LoadBalancers.Pools.Delete(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerPoolDeleteResponse, error) +- client.LoadBalancers.Pools.AccountLoadBalancerPoolsNewPool(ctx context.Context, accountIdentifier string, body cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParams) (cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse, error) +- client.LoadBalancers.Pools.AccountLoadBalancerPoolsListPools(ctx context.Context, accountIdentifier string, query cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams) (cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse, error) +- client.LoadBalancers.Pools.AccountLoadBalancerPoolsPatchPools(ctx context.Context, accountIdentifier string, body cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParams) (cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse, error) -### H2Prioritizations +### Health Response Types: -- cloudflare.ZoneSettingH2PrioritizationUpdateResponse -- cloudflare.ZoneSettingH2PrioritizationListResponse +- cloudflare.LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse Methods: -- client.Zones.Settings.H2Prioritizations.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingH2PrioritizationUpdateParams) (cloudflare.ZoneSettingH2PrioritizationUpdateResponse, error) -- client.Zones.Settings.H2Prioritizations.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingH2PrioritizationListResponse, error) +- client.LoadBalancers.Pools.Health.AccountLoadBalancerPoolsPoolHealthDetails(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse, error) -### HotlinkProtections +### Previews Response Types: -- cloudflare.ZoneSettingHotlinkProtectionUpdateResponse -- cloudflare.ZoneSettingHotlinkProtectionListResponse +- cloudflare.LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse Methods: -- client.Zones.Settings.HotlinkProtections.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingHotlinkProtectionUpdateParams) (cloudflare.ZoneSettingHotlinkProtectionUpdateResponse, error) -- client.Zones.Settings.HotlinkProtections.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingHotlinkProtectionListResponse, error) +- client.LoadBalancers.Pools.Previews.AccountLoadBalancerPoolsPreviewPool(ctx context.Context, accountIdentifier string, identifier string, body cloudflare.LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParams) (cloudflare.LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse, error) -### HTTP2s +### References Response Types: -- cloudflare.ZoneSettingHTTP2UpdateResponse -- cloudflare.ZoneSettingHTTP2ListResponse +- cloudflare.LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse Methods: -- client.Zones.Settings.HTTP2s.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingHTTP2UpdateParams) (cloudflare.ZoneSettingHTTP2UpdateResponse, error) -- client.Zones.Settings.HTTP2s.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingHTTP2ListResponse, error) +- client.LoadBalancers.Pools.References.AccountLoadBalancerPoolsListPoolReferences(ctx context.Context, accountIdentifier string, identifier string) (cloudflare.LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse, error) -### HTTP3s +## Previews Response Types: -- cloudflare.ZoneSettingHTTP3UpdateResponse -- cloudflare.ZoneSettingHTTP3ListResponse +- cloudflare.LoadBalancerPreviewGetResponse Methods: -- client.Zones.Settings.HTTP3s.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingHTTP3UpdateParams) (cloudflare.ZoneSettingHTTP3UpdateResponse, error) -- client.Zones.Settings.HTTP3s.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingHTTP3ListResponse, error) +- client.LoadBalancers.Previews.Get(ctx context.Context, accountIdentifier string, previewID interface{}) (cloudflare.LoadBalancerPreviewGetResponse, error) -### ImageResizings +## Regions Response Types: -- cloudflare.ZoneSettingImageResizingUpdateResponse -- cloudflare.ZoneSettingImageResizingListResponse +- cloudflare.LoadBalancerRegionGetResponse +- cloudflare.LoadBalancerRegionLoadBalancerRegionsListRegionsResponse Methods: -- client.Zones.Settings.ImageResizings.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingImageResizingUpdateParams) (cloudflare.ZoneSettingImageResizingUpdateResponse, error) -- client.Zones.Settings.ImageResizings.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingImageResizingListResponse, error) +- client.LoadBalancers.Regions.Get(ctx context.Context, accountIdentifier string, regionCode cloudflare.LoadBalancerRegionGetParamsRegionCode) (cloudflare.LoadBalancerRegionGetResponse, error) +- client.LoadBalancers.Regions.LoadBalancerRegionsListRegions(ctx context.Context, accountIdentifier string, query cloudflare.LoadBalancerRegionLoadBalancerRegionsListRegionsParams) (cloudflare.LoadBalancerRegionLoadBalancerRegionsListRegionsResponse, error) -### IPGeolocations +## Searches Response Types: -- cloudflare.ZoneSettingIPGeolocationUpdateResponse -- cloudflare.ZoneSettingIPGeolocationListResponse +- cloudflare.LoadBalancerSearchListResponse Methods: -- client.Zones.Settings.IPGeolocations.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingIPGeolocationUpdateParams) (cloudflare.ZoneSettingIPGeolocationUpdateResponse, error) -- client.Zones.Settings.IPGeolocations.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingIPGeolocationListResponse, error) - -### IPV6s +- client.LoadBalancers.Searches.List(ctx context.Context, accountIdentifier string, query cloudflare.LoadBalancerSearchListParams) (cloudflare.LoadBalancerSearchListResponse, error) -Response Types: - -- cloudflare.ZoneSettingIPV6UpdateResponse -- cloudflare.ZoneSettingIPV6ListResponse - -Methods: +# Access -- client.Zones.Settings.IPV6s.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingIPV6UpdateParams) (cloudflare.ZoneSettingIPV6UpdateResponse, error) -- client.Zones.Settings.IPV6s.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingIPV6ListResponse, error) - -### MinTLSVersions +## Apps Response Types: -- cloudflare.ZoneSettingMinTLSVersionUpdateResponse -- cloudflare.ZoneSettingMinTLSVersionListResponse +- cloudflare.AccessAppGetResponse +- cloudflare.AccessAppUpdateResponse +- cloudflare.AccessAppDeleteResponse +- cloudflare.AccessAppAccessApplicationsAddAnApplicationResponse +- cloudflare.AccessAppAccessApplicationsListAccessApplicationsResponse Methods: -- client.Zones.Settings.MinTLSVersions.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingMinTLSVersionUpdateParams) (cloudflare.ZoneSettingMinTLSVersionUpdateResponse, error) -- client.Zones.Settings.MinTLSVersions.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingMinTLSVersionListResponse, error) +- client.Access.Apps.Get(ctx context.Context, accountOrZone string, accountOrZoneID string, appID cloudflare.AccessAppGetParamsAppID) (cloudflare.AccessAppGetResponse, error) +- client.Access.Apps.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, appID cloudflare.AccessAppUpdateParamsVariant0AppID, body cloudflare.AccessAppUpdateParams) (cloudflare.AccessAppUpdateResponse, error) +- client.Access.Apps.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, appID cloudflare.AccessAppDeleteParamsAppID) (cloudflare.AccessAppDeleteResponse, error) +- client.Access.Apps.AccessApplicationsAddAnApplication(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessAppAccessApplicationsAddAnApplicationParams) (cloudflare.AccessAppAccessApplicationsAddAnApplicationResponse, error) +- client.Access.Apps.AccessApplicationsListAccessApplications(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessAppAccessApplicationsListAccessApplicationsResponse, error) -### Minifies +### Cas Response Types: -- cloudflare.ZoneSettingMinifyUpdateResponse -- cloudflare.ZoneSettingMinifyListResponse +- cloudflare.AccessAppCaDeleteResponse +- cloudflare.AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse +- cloudflare.AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse +- cloudflare.AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse Methods: -- client.Zones.Settings.Minifies.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingMinifyUpdateParams) (cloudflare.ZoneSettingMinifyUpdateResponse, error) -- client.Zones.Settings.Minifies.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingMinifyListResponse, error) +- client.Access.Apps.Cas.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessAppCaDeleteResponse, error) +- client.Access.Apps.Cas.AccessShortLivedCertificateCAsNewAShortLivedCertificateCa(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessAppCaAccessShortLivedCertificateCAsNewAShortLivedCertificateCaResponse, error) +- client.Access.Apps.Cas.AccessShortLivedCertificateCAsGetAShortLivedCertificateCa(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessAppCaAccessShortLivedCertificateCAsGetAShortLivedCertificateCaResponse, error) +- client.Access.Apps.Cas.AccessShortLivedCertificateCAsListShortLivedCertificateCAs(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessAppCaAccessShortLivedCertificateCAsListShortLivedCertificateCAsResponse, error) -### Mirages +### RevokeTokens Response Types: -- cloudflare.ZoneSettingMirageUpdateResponse -- cloudflare.ZoneSettingMirageListResponse +- cloudflare.AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse Methods: -- client.Zones.Settings.Mirages.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingMirageUpdateParams) (cloudflare.ZoneSettingMirageUpdateResponse, error) -- client.Zones.Settings.Mirages.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingMirageListResponse, error) +- client.Access.Apps.RevokeTokens.AccessApplicationsRevokeServiceTokens(ctx context.Context, accountOrZone string, accountOrZoneID string, appID cloudflare.AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensParamsAppID) (cloudflare.AccessAppRevokeTokenAccessApplicationsRevokeServiceTokensResponse, error) -### MobileRedirects +### UserPolicyChecks Response Types: -- cloudflare.ZoneSettingMobileRedirectUpdateResponse -- cloudflare.ZoneSettingMobileRedirectListResponse +- cloudflare.AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse Methods: -- client.Zones.Settings.MobileRedirects.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingMobileRedirectUpdateParams) (cloudflare.ZoneSettingMobileRedirectUpdateResponse, error) -- client.Zones.Settings.MobileRedirects.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingMobileRedirectListResponse, error) +- client.Access.Apps.UserPolicyChecks.AccessApplicationsTestAccessPolicies(ctx context.Context, accountOrZone string, accountOrZoneID string, appID cloudflare.AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesParamsAppID) (cloudflare.AccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesResponse, error) -### NELs +### Policies Response Types: -- cloudflare.ZoneSettingNELUpdateResponse -- cloudflare.ZoneSettingNELListResponse +- cloudflare.AccessAppPolicyGetResponse +- cloudflare.AccessAppPolicyUpdateResponse +- cloudflare.AccessAppPolicyDeleteResponse +- cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse +- cloudflare.AccessAppPolicyAccessPoliciesListAccessPoliciesResponse Methods: -- client.Zones.Settings.NELs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingNELUpdateParams) (cloudflare.ZoneSettingNELUpdateResponse, error) -- client.Zones.Settings.NELs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingNELListResponse, error) +- client.Access.Apps.Policies.Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string) (cloudflare.AccessAppPolicyGetResponse, error) +- client.Access.Apps.Policies.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string, body cloudflare.AccessAppPolicyUpdateParams) (cloudflare.AccessAppPolicyUpdateResponse, error) +- client.Access.Apps.Policies.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid1 string, uuid string) (cloudflare.AccessAppPolicyDeleteResponse, error) +- client.Access.Apps.Policies.AccessPoliciesNewAnAccessPolicy(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyParams) (cloudflare.AccessAppPolicyAccessPoliciesNewAnAccessPolicyResponse, error) +- client.Access.Apps.Policies.AccessPoliciesListAccessPolicies(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessAppPolicyAccessPoliciesListAccessPoliciesResponse, error) -### OpportunisticEncryptions +## Certificates Response Types: -- cloudflare.ZoneSettingOpportunisticEncryptionUpdateResponse -- cloudflare.ZoneSettingOpportunisticEncryptionListResponse +- cloudflare.AccessCertificateGetResponse +- cloudflare.AccessCertificateUpdateResponse +- cloudflare.AccessCertificateDeleteResponse +- cloudflare.AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse +- cloudflare.AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse Methods: -- client.Zones.Settings.OpportunisticEncryptions.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingOpportunisticEncryptionUpdateParams) (cloudflare.ZoneSettingOpportunisticEncryptionUpdateResponse, error) -- client.Zones.Settings.OpportunisticEncryptions.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingOpportunisticEncryptionListResponse, error) +- client.Access.Certificates.Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessCertificateGetResponse, error) +- client.Access.Certificates.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body cloudflare.AccessCertificateUpdateParams) (cloudflare.AccessCertificateUpdateResponse, error) +- client.Access.Certificates.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessCertificateDeleteResponse, error) +- client.Access.Certificates.AccessMTLSAuthenticationAddAnMTLSCertificate(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessCertificateAccessMTLSAuthenticationAddAnMTLSCertificateParams) (cloudflare.AccessCertificateAccessMtlsAuthenticationAddAnMtlsCertificateResponse, error) +- client.Access.Certificates.AccessMTLSAuthenticationListMTLSCertificates(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessCertificateAccessMtlsAuthenticationListMtlsCertificatesResponse, error) -### OpportunisticOnions +## Groups Response Types: -- cloudflare.ZoneSettingOpportunisticOnionUpdateResponse -- cloudflare.ZoneSettingOpportunisticOnionListResponse +- cloudflare.AccessGroupGetResponse +- cloudflare.AccessGroupUpdateResponse +- cloudflare.AccessGroupDeleteResponse +- cloudflare.AccessGroupAccessGroupsNewAnAccessGroupResponse +- cloudflare.AccessGroupAccessGroupsListAccessGroupsResponse Methods: -- client.Zones.Settings.OpportunisticOnions.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingOpportunisticOnionUpdateParams) (cloudflare.ZoneSettingOpportunisticOnionUpdateResponse, error) -- client.Zones.Settings.OpportunisticOnions.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingOpportunisticOnionListResponse, error) +- client.Access.Groups.Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessGroupGetResponse, error) +- client.Access.Groups.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body cloudflare.AccessGroupUpdateParams) (cloudflare.AccessGroupUpdateResponse, error) +- client.Access.Groups.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessGroupDeleteResponse, error) +- client.Access.Groups.AccessGroupsNewAnAccessGroup(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessGroupAccessGroupsNewAnAccessGroupParams) (cloudflare.AccessGroupAccessGroupsNewAnAccessGroupResponse, error) +- client.Access.Groups.AccessGroupsListAccessGroups(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessGroupAccessGroupsListAccessGroupsResponse, error) -### OrangeToOranges +## IdentityProviders Response Types: -- cloudflare.ZoneSettingOrangeToOrangeUpdateResponse -- cloudflare.ZoneSettingOrangeToOrangeListResponse +- cloudflare.AccessIdentityProviderGetResponse +- cloudflare.AccessIdentityProviderUpdateResponse +- cloudflare.AccessIdentityProviderDeleteResponse +- cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse +- cloudflare.AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse Methods: -- client.Zones.Settings.OrangeToOranges.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingOrangeToOrangeUpdateParams) (cloudflare.ZoneSettingOrangeToOrangeUpdateResponse, error) -- client.Zones.Settings.OrangeToOranges.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingOrangeToOrangeListResponse, error) +- client.Access.IdentityProviders.Get(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessIdentityProviderGetResponse, error) +- client.Access.IdentityProviders.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body cloudflare.AccessIdentityProviderUpdateParams) (cloudflare.AccessIdentityProviderUpdateResponse, error) +- client.Access.IdentityProviders.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessIdentityProviderDeleteResponse, error) +- client.Access.IdentityProviders.AccessIdentityProvidersAddAnAccessIdentityProvider(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderParams) (cloudflare.AccessIdentityProviderAccessIdentityProvidersAddAnAccessIdentityProviderResponse, error) +- client.Access.IdentityProviders.AccessIdentityProvidersListAccessIdentityProviders(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessIdentityProviderAccessIdentityProvidersListAccessIdentityProvidersResponse, error) -### OriginErrorPagePassThrus +## Organizations Response Types: -- cloudflare.ZoneSettingOriginErrorPagePassThrusUpdateResponse -- cloudflare.ZoneSettingOriginErrorPagePassThrusListResponse +- cloudflare.AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse +- cloudflare.AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse +- cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse Methods: -- client.Zones.Settings.OriginErrorPagePassThrus.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingOriginErrorPagePassThrusUpdateParams) (cloudflare.ZoneSettingOriginErrorPagePassThrusUpdateResponse, error) -- client.Zones.Settings.OriginErrorPagePassThrus.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingOriginErrorPagePassThrusListResponse, error) +- client.Access.Organizations.ZeroTrustOrganizationNewYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationParams) (cloudflare.AccessOrganizationZeroTrustOrganizationNewYourZeroTrustOrganizationResponse, error) +- client.Access.Organizations.ZeroTrustOrganizationGetYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessOrganizationZeroTrustOrganizationGetYourZeroTrustOrganizationResponse, error) +- client.Access.Organizations.ZeroTrustOrganizationUpdateYourZeroTrustOrganization(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationParams) (cloudflare.AccessOrganizationZeroTrustOrganizationUpdateYourZeroTrustOrganizationResponse, error) -### OriginMaxHTTPVersions +## ServiceTokens Response Types: -- cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateResponse -- cloudflare.ZoneSettingOriginMaxHTTPVersionListResponse +- cloudflare.AccessServiceTokenUpdateResponse +- cloudflare.AccessServiceTokenDeleteResponse +- cloudflare.AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse +- cloudflare.AccessServiceTokenAccessServiceTokensListServiceTokensResponse Methods: -- client.Zones.Settings.OriginMaxHTTPVersions.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateParams) (cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateResponse, error) -- client.Zones.Settings.OriginMaxHTTPVersions.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingOriginMaxHTTPVersionListResponse, error) +- client.Access.ServiceTokens.Update(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string, body cloudflare.AccessServiceTokenUpdateParams) (cloudflare.AccessServiceTokenUpdateResponse, error) +- client.Access.ServiceTokens.Delete(ctx context.Context, accountOrZone string, accountOrZoneID string, uuid string) (cloudflare.AccessServiceTokenDeleteResponse, error) +- client.Access.ServiceTokens.AccessServiceTokensNewAServiceToken(ctx context.Context, accountOrZone string, accountOrZoneID string, body cloudflare.AccessServiceTokenAccessServiceTokensNewAServiceTokenParams) (cloudflare.AccessServiceTokenAccessServiceTokensNewAServiceTokenResponse, error) +- client.Access.ServiceTokens.AccessServiceTokensListServiceTokens(ctx context.Context, accountOrZone string, accountOrZoneID string) (cloudflare.AccessServiceTokenAccessServiceTokensListServiceTokensResponse, error) -### Polishes +### Refreshes Response Types: -- cloudflare.ZoneSettingPolishUpdateResponse -- cloudflare.ZoneSettingPolishListResponse +- cloudflare.AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse Methods: -- client.Zones.Settings.Polishes.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingPolishUpdateParams) (cloudflare.ZoneSettingPolishUpdateResponse, error) -- client.Zones.Settings.Polishes.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingPolishListResponse, error) +- client.Access.ServiceTokens.Refreshes.AccessServiceTokensRefreshAServiceToken(ctx context.Context, identifier string, uuid string) (cloudflare.AccessServiceTokenRefreshAccessServiceTokensRefreshAServiceTokenResponse, error) -### PrefetchPreloads +### Rotates Response Types: -- cloudflare.ZoneSettingPrefetchPreloadUpdateResponse -- cloudflare.ZoneSettingPrefetchPreloadListResponse +- cloudflare.AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse Methods: -- client.Zones.Settings.PrefetchPreloads.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingPrefetchPreloadUpdateParams) (cloudflare.ZoneSettingPrefetchPreloadUpdateResponse, error) -- client.Zones.Settings.PrefetchPreloads.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingPrefetchPreloadListResponse, error) - -### PrivacyPasses +- client.Access.ServiceTokens.Rotates.AccessServiceTokensRotateAServiceToken(ctx context.Context, identifier string, uuid string) (cloudflare.AccessServiceTokenRotateAccessServiceTokensRotateAServiceTokenResponse, error) -### ProxyReadTimeouts +## Bookmarks Response Types: -- cloudflare.ZoneSettingProxyReadTimeoutUpdateResponse -- cloudflare.ZoneSettingProxyReadTimeoutListResponse +- cloudflare.AccessBookmarkGetResponse +- cloudflare.AccessBookmarkUpdateResponse +- cloudflare.AccessBookmarkDeleteResponse +- cloudflare.AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse Methods: -- client.Zones.Settings.ProxyReadTimeouts.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingProxyReadTimeoutUpdateParams) (cloudflare.ZoneSettingProxyReadTimeoutUpdateResponse, error) -- client.Zones.Settings.ProxyReadTimeouts.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingProxyReadTimeoutListResponse, error) +- client.Access.Bookmarks.Get(ctx context.Context, identifier interface{}, uuid string) (cloudflare.AccessBookmarkGetResponse, error) +- client.Access.Bookmarks.Update(ctx context.Context, identifier interface{}, uuid string) (cloudflare.AccessBookmarkUpdateResponse, error) +- client.Access.Bookmarks.Delete(ctx context.Context, identifier interface{}, uuid string) (cloudflare.AccessBookmarkDeleteResponse, error) +- client.Access.Bookmarks.AccessBookmarkApplicationsDeprecatedListBookmarkApplications(ctx context.Context, identifier interface{}) (cloudflare.AccessBookmarkAccessBookmarkApplicationsDeprecatedListBookmarkApplicationsResponse, error) -### PseudoIpv4s +## Keys Response Types: -- cloudflare.ZoneSettingPseudoIpv4UpdateResponse -- cloudflare.ZoneSettingPseudoIpv4ListResponse +- cloudflare.AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse +- cloudflare.AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse Methods: -- client.Zones.Settings.PseudoIpv4s.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingPseudoIpv4UpdateParams) (cloudflare.ZoneSettingPseudoIpv4UpdateResponse, error) -- client.Zones.Settings.PseudoIpv4s.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingPseudoIpv4ListResponse, error) +- client.Access.Keys.AccessKeyConfigurationGetTheAccessKeyConfiguration(ctx context.Context, identifier string) (cloudflare.AccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponse, error) +- client.Access.Keys.AccessKeyConfigurationUpdateTheAccessKeyConfiguration(ctx context.Context, identifier string, body cloudflare.AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationParams) (cloudflare.AccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse, error) -### ResponseBufferings +### Rotates Response Types: -- cloudflare.ZoneSettingResponseBufferingUpdateResponse -- cloudflare.ZoneSettingResponseBufferingListResponse +- cloudflare.AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse Methods: -- client.Zones.Settings.ResponseBufferings.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingResponseBufferingUpdateParams) (cloudflare.ZoneSettingResponseBufferingUpdateResponse, error) -- client.Zones.Settings.ResponseBufferings.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingResponseBufferingListResponse, error) - -### RocketLoaders - -Response Types: - -- cloudflare.ZoneSettingRocketLoaderUpdateResponse -- cloudflare.ZoneSettingRocketLoaderListResponse - -Methods: +- client.Access.Keys.Rotates.AccessKeyConfigurationRotateAccessKeys(ctx context.Context, identifier string) (cloudflare.AccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse, error) -- client.Zones.Settings.RocketLoaders.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingRocketLoaderUpdateParams) (cloudflare.ZoneSettingRocketLoaderUpdateResponse, error) -- client.Zones.Settings.RocketLoaders.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingRocketLoaderListResponse, error) +## Logs -### SecurityHeaders +### AccessRequests Response Types: -- cloudflare.ZoneSettingSecurityHeaderUpdateResponse -- cloudflare.ZoneSettingSecurityHeaderListResponse +- cloudflare.AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse Methods: -- client.Zones.Settings.SecurityHeaders.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingSecurityHeaderUpdateParams) (cloudflare.ZoneSettingSecurityHeaderUpdateResponse, error) -- client.Zones.Settings.SecurityHeaders.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingSecurityHeaderListResponse, error) +- client.Access.Logs.AccessRequests.AccessAuthenticationLogsGetAccessAuthenticationLogs(ctx context.Context, identifier string) (cloudflare.AccessLogAccessRequestAccessAuthenticationLogsGetAccessAuthenticationLogsResponse, error) -### SecurityLevels +## Seats Response Types: -- cloudflare.ZoneSettingSecurityLevelUpdateResponse -- cloudflare.ZoneSettingSecurityLevelListResponse +- cloudflare.AccessSeatZeroTrustSeatsUpdateAUserSeatResponse Methods: -- client.Zones.Settings.SecurityLevels.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingSecurityLevelUpdateParams) (cloudflare.ZoneSettingSecurityLevelUpdateResponse, error) -- client.Zones.Settings.SecurityLevels.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingSecurityLevelListResponse, error) +- client.Access.Seats.ZeroTrustSeatsUpdateAUserSeat(ctx context.Context, identifier string, body cloudflare.AccessSeatZeroTrustSeatsUpdateAUserSeatParams) (cloudflare.AccessSeatZeroTrustSeatsUpdateAUserSeatResponse, error) -### ServerSideExcludes +## Users Response Types: -- cloudflare.ZoneSettingServerSideExcludeUpdateResponse -- cloudflare.ZoneSettingServerSideExcludeListResponse +- cloudflare.AccessUserZeroTrustUsersGetUsersResponse Methods: -- client.Zones.Settings.ServerSideExcludes.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingServerSideExcludeUpdateParams) (cloudflare.ZoneSettingServerSideExcludeUpdateResponse, error) -- client.Zones.Settings.ServerSideExcludes.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingServerSideExcludeListResponse, error) +- client.Access.Users.ZeroTrustUsersGetUsers(ctx context.Context, identifier string) (cloudflare.AccessUserZeroTrustUsersGetUsersResponse, error) -### SortQueryStringForCaches +### FailedLogins Response Types: -- cloudflare.ZoneSettingSortQueryStringForCachUpdateResponse -- cloudflare.ZoneSettingSortQueryStringForCachListResponse +- cloudflare.AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse Methods: -- client.Zones.Settings.SortQueryStringForCaches.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingSortQueryStringForCachUpdateParams) (cloudflare.ZoneSettingSortQueryStringForCachUpdateResponse, error) -- client.Zones.Settings.SortQueryStringForCaches.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingSortQueryStringForCachListResponse, error) +- client.Access.Users.FailedLogins.ZeroTrustUsersGetFailedLogins(ctx context.Context, identifier string, id string) (cloudflare.AccessUserFailedLoginZeroTrustUsersGetFailedLoginsResponse, error) -### SSLs +# DNSRecords Response Types: -- cloudflare.ZoneSettingSSLUpdateResponse -- cloudflare.ZoneSettingSSLListResponse +- cloudflare.DNSRecordGetResponse +- cloudflare.DNSRecordUpdateResponse +- cloudflare.DNSRecordDeleteResponse +- cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordResponse +- cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsResponse Methods: -- client.Zones.Settings.SSLs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingSSLUpdateParams) (cloudflare.ZoneSettingSSLUpdateResponse, error) -- client.Zones.Settings.SSLs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingSSLListResponse, error) +- client.DNSRecords.Get(ctx context.Context, zoneID string, dnsRecordID string) (cloudflare.DNSRecordGetResponse, error) +- client.DNSRecords.Update(ctx context.Context, zoneID string, dnsRecordID string, body cloudflare.DNSRecordUpdateParams) (cloudflare.DNSRecordUpdateResponse, error) +- client.DNSRecords.Delete(ctx context.Context, zoneID string, dnsRecordID string) (cloudflare.DNSRecordDeleteResponse, error) +- client.DNSRecords.DNSRecordsForAZoneNewDNSRecord(ctx context.Context, zoneID string, body cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordParams) (cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordResponse, error) +- client.DNSRecords.DNSRecordsForAZoneListDNSRecords(ctx context.Context, zoneID string, query cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParams) (cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsResponse, error) -### SSLRecommenders - -Response Types: - -- cloudflare.ZoneSettingSSLRecommenderUpdateResponse -- cloudflare.ZoneSettingSSLRecommenderListResponse +## Exports Methods: -- client.Zones.Settings.SSLRecommenders.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingSSLRecommenderUpdateParams) (cloudflare.ZoneSettingSSLRecommenderUpdateResponse, error) -- client.Zones.Settings.SSLRecommenders.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingSSLRecommenderListResponse, error) +- client.DNSRecords.Exports.List(ctx context.Context, zoneID string) (string, error) -### TLS1_3s +## Imports Response Types: -- cloudflare.ZoneSettingTls1_3UpdateResponse -- cloudflare.ZoneSettingTls1_3ListResponse +- cloudflare.DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse Methods: -- client.Zones.Settings.TLS1_3s.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingTLS1_3UpdateParams) (cloudflare.ZoneSettingTls1_3UpdateResponse, error) -- client.Zones.Settings.TLS1_3s.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingTls1_3ListResponse, error) +- client.DNSRecords.Imports.DNSRecordsForAZoneImportDNSRecords(ctx context.Context, zoneID string, body cloudflare.DNSRecordImportDNSRecordsForAZoneImportDNSRecordsParams) (cloudflare.DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse, error) -### TLSClientAuths +## Scans Response Types: -- cloudflare.ZoneSettingTLSClientAuthUpdateResponse -- cloudflare.ZoneSettingTLSClientAuthListResponse +- cloudflare.DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse Methods: -- client.Zones.Settings.TLSClientAuths.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingTLSClientAuthUpdateParams) (cloudflare.ZoneSettingTLSClientAuthUpdateResponse, error) -- client.Zones.Settings.TLSClientAuths.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingTLSClientAuthListResponse, error) - -### TrueClientIPHeaders - -Response Types: - -- cloudflare.ZoneSettingTrueClientIPHeaderUpdateResponse -- cloudflare.ZoneSettingTrueClientIPHeaderListResponse +- client.DNSRecords.Scans.DNSRecordsForAZoneScanDNSRecords(ctx context.Context, zoneID string) (cloudflare.DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse, error) -Methods: - -- client.Zones.Settings.TrueClientIPHeaders.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingTrueClientIPHeaderUpdateParams) (cloudflare.ZoneSettingTrueClientIPHeaderUpdateResponse, error) -- client.Zones.Settings.TrueClientIPHeaders.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingTrueClientIPHeaderListResponse, error) +# Emails -### WAFs +## Routings Response Types: -- cloudflare.ZoneSettingWAFUpdateResponse -- cloudflare.ZoneSettingWAFListResponse +- cloudflare.EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse Methods: -- client.Zones.Settings.WAFs.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingWAFUpdateParams) (cloudflare.ZoneSettingWAFUpdateResponse, error) -- client.Zones.Settings.WAFs.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingWAFListResponse, error) +- client.Emails.Routings.EmailRoutingSettingsGetEmailRoutingSettings(ctx context.Context, zoneIdentifier string) (cloudflare.EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse, error) -### Webps +### Disables Response Types: -- cloudflare.ZoneSettingWebpUpdateResponse -- cloudflare.ZoneSettingWebpListResponse +- cloudflare.EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse Methods: -- client.Zones.Settings.Webps.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingWebpUpdateParams) (cloudflare.ZoneSettingWebpUpdateResponse, error) -- client.Zones.Settings.Webps.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingWebpListResponse, error) +- client.Emails.Routings.Disables.EmailRoutingSettingsDisableEmailRouting(ctx context.Context, zoneIdentifier string) (cloudflare.EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse, error) -### Websockets +### DNS Response Types: -- cloudflare.ZoneSettingWebsocketUpdateResponse -- cloudflare.ZoneSettingWebsocketListResponse +- cloudflare.EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse Methods: -- client.Zones.Settings.Websockets.Update(ctx context.Context, zoneIdentifier string, body cloudflare.ZoneSettingWebsocketUpdateParams) (cloudflare.ZoneSettingWebsocketUpdateResponse, error) -- client.Zones.Settings.Websockets.List(ctx context.Context, zoneIdentifier string) (cloudflare.ZoneSettingWebsocketListResponse, error) +- client.Emails.Routings.DNS.EmailRoutingSettingsEmailRoutingDNSSettings(ctx context.Context, zoneIdentifier string) (cloudflare.EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse, error) -# AI +### Enables Response Types: -- cloudflare.AIRunResponse +- cloudflare.EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse Methods: -- client.AI.Run(ctx context.Context, accountIdentifier string, modelName string, body cloudflare.AIRunParams) (cloudflare.AIRunResponse, error) +- client.Emails.Routings.Enables.EmailRoutingSettingsEnableEmailRouting(ctx context.Context, zoneIdentifier string) (cloudflare.EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse, error) -## Huggingface +### Rules Response Types: -- cloudflare.AIHuggingfaceDistilbertSst2Int8Response +- cloudflare.EmailRoutingRuleGetResponse +- cloudflare.EmailRoutingRuleUpdateResponse +- cloudflare.EmailRoutingRuleDeleteResponse +- cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse +- cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse Methods: -- client.AI.Huggingface.DistilbertSst2Int8(ctx context.Context, accountIdentifier string, body cloudflare.AIHuggingfaceDistilbertSst2Int8Params) ([]cloudflare.AIHuggingfaceDistilbertSst2Int8Response, error) +- client.Emails.Routings.Rules.Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (cloudflare.EmailRoutingRuleGetResponse, error) +- client.Emails.Routings.Rules.Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body cloudflare.EmailRoutingRuleUpdateParams) (cloudflare.EmailRoutingRuleUpdateResponse, error) +- client.Emails.Routings.Rules.Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (cloudflare.EmailRoutingRuleDeleteResponse, error) +- client.Emails.Routings.Rules.EmailRoutingRoutingRulesNewRoutingRule(ctx context.Context, zoneIdentifier string, body cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParams) (cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse, error) +- client.Emails.Routings.Rules.EmailRoutingRoutingRulesListRoutingRules(ctx context.Context, zoneIdentifier string, query cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams) (cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse, error) -## Baai +#### CatchAlls Response Types: -- cloudflare.AIBaaiBgeBaseEnV1_5Response -- cloudflare.AIBaaiBgeLargeEnV1_5Response -- cloudflare.AIBaaiBgeSmallEnV1_5Response +- cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse +- cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse Methods: -- client.AI.Baai.BgeBaseEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeBaseEnV1_5Params) (cloudflare.AIBaaiBgeBaseEnV1_5Response, error) -- client.AI.Baai.BgeLargeEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeLargeEnV1_5Params) (cloudflare.AIBaaiBgeLargeEnV1_5Response, error) -- client.AI.Baai.BgeSmallEnV1_5(ctx context.Context, accountIdentifier string, body cloudflare.AIBaaiBgeSmallEnV1_5Params) (cloudflare.AIBaaiBgeSmallEnV1_5Response, error) +- client.Emails.Routings.Rules.CatchAlls.EmailRoutingRoutingRulesGetCatchAllRule(ctx context.Context, zoneIdentifier string) (cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse, error) +- client.Emails.Routings.Rules.CatchAlls.EmailRoutingRoutingRulesUpdateCatchAllRule(ctx context.Context, zoneIdentifier string, body cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParams) (cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse, error) -## OpenAI +### Addresses Response Types: -- cloudflare.AIOpenAIWhisperResponse +- cloudflare.EmailRoutingAddressGetResponse +- cloudflare.EmailRoutingAddressDeleteResponse +- cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse +- cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse Methods: -- client.AI.OpenAI.Whisper(ctx context.Context, accountIdentifier string) (cloudflare.AIOpenAIWhisperResponse, error) +- client.Emails.Routings.Addresses.Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (cloudflare.EmailRoutingAddressGetResponse, error) +- client.Emails.Routings.Addresses.Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (cloudflare.EmailRoutingAddressDeleteResponse, error) +- client.Emails.Routings.Addresses.EmailRoutingDestinationAddressesNewADestinationAddress(ctx context.Context, accountIdentifier string, body cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressParams) (cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse, error) +- client.Emails.Routings.Addresses.EmailRoutingDestinationAddressesListDestinationAddresses(ctx context.Context, accountIdentifier string, query cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams) (cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse, error) -## Microsoft +# AccountMembers Response Types: -- cloudflare.AIMicrosoftResnet50Response +- cloudflare.AccountMemberGetResponse +- cloudflare.AccountMemberUpdateResponse +- cloudflare.AccountMemberDeleteResponse +- cloudflare.AccountMemberAccountMembersAddMemberResponse +- cloudflare.AccountMemberAccountMembersListMembersResponse Methods: -- client.AI.Microsoft.Resnet50(ctx context.Context, accountIdentifier string) ([]cloudflare.AIMicrosoftResnet50Response, error) +- client.AccountMembers.Get(ctx context.Context, accountIdentifier interface{}, identifier string) (cloudflare.AccountMemberGetResponse, error) +- client.AccountMembers.Update(ctx context.Context, accountIdentifier interface{}, identifier string, body cloudflare.AccountMemberUpdateParams) (cloudflare.AccountMemberUpdateResponse, error) +- client.AccountMembers.Delete(ctx context.Context, accountIdentifier interface{}, identifier string) (cloudflare.AccountMemberDeleteResponse, error) +- client.AccountMembers.AccountMembersAddMember(ctx context.Context, accountIdentifier interface{}, body cloudflare.AccountMemberAccountMembersAddMemberParams) (cloudflare.AccountMemberAccountMembersAddMemberResponse, error) +- client.AccountMembers.AccountMembersListMembers(ctx context.Context, accountIdentifier interface{}, query cloudflare.AccountMemberAccountMembersListMembersParams) (cloudflare.AccountMemberAccountMembersListMembersResponse, error) -## Meta +# Tunnels Response Types: -- cloudflare.AIMetaLlama2_7bChatFp16Response -- cloudflare.AIMetaLlama2_7bChatInt8Response -- cloudflare.AIMetaM2m100_1_2bResponse +- cloudflare.TunnelGetResponse +- cloudflare.TunnelDeleteResponse +- cloudflare.TunnelArgoTunnelNewAnArgoTunnelResponse +- cloudflare.TunnelArgoTunnelListArgoTunnelsResponse Methods: -- client.AI.Meta.Llama2_7bChatFp16(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaLlama2_7bChatFp16Params) (cloudflare.AIMetaLlama2_7bChatFp16Response, error) -- client.AI.Meta.Llama2_7bChatInt8(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaLlama2_7bChatInt8Params) (cloudflare.AIMetaLlama2_7bChatInt8Response, error) -- client.AI.Meta.M2m100_1_2b(ctx context.Context, accountIdentifier string, body cloudflare.AIMetaM2m100_1_2bParams) (cloudflare.AIMetaM2m100_1_2bResponse, error) +- client.Tunnels.Get(ctx context.Context, accountID string, tunnelID string) (cloudflare.TunnelGetResponse, error) +- client.Tunnels.Delete(ctx context.Context, accountID string, tunnelID string, body cloudflare.TunnelDeleteParams) (cloudflare.TunnelDeleteResponse, error) +- client.Tunnels.ArgoTunnelNewAnArgoTunnel(ctx context.Context, accountID string, body cloudflare.TunnelArgoTunnelNewAnArgoTunnelParams) (cloudflare.TunnelArgoTunnelNewAnArgoTunnelResponse, error) +- client.Tunnels.ArgoTunnelListArgoTunnels(ctx context.Context, accountID string, query cloudflare.TunnelArgoTunnelListArgoTunnelsParams) (cloudflare.TunnelArgoTunnelListArgoTunnelsResponse, error) -## Mistral +## Connections Response Types: -- cloudflare.AIMistralMistral7bInstructV0_1Response +- cloudflare.TunnelConnectionDeleteResponse Methods: -- client.AI.Mistral.Mistral7bInstructV0_1(ctx context.Context, accountIdentifier string, body cloudflare.AIMistralMistral7bInstructV0_1Params) (cloudflare.AIMistralMistral7bInstructV0_1Response, error) +- client.Tunnels.Connections.Delete(ctx context.Context, accountID string, tunnelID string, body cloudflare.TunnelConnectionDeleteParams) (cloudflare.TunnelConnectionDeleteResponse, error) diff --git a/client.go b/client.go index ff1ed730ac1..9b5bd43d096 100644 --- a/client.go +++ b/client.go @@ -12,9 +12,17 @@ import ( // interacting with the cloudflare API. You should not instantiate this client // directly, and instead use the [NewClient] method instead. type Client struct { - Options []option.RequestOption - Zones *ZoneService - AI *AIService + Options []option.RequestOption + Accounts *AccountService + IPs *IPService + Zones *ZoneService + AI *AIService + LoadBalancers *LoadBalancerService + Access *AccessService + DNSRecords *DNSRecordService + Emails *EmailService + AccountMembers *AccountMemberService + Tunnels *TunnelService } // NewClient generates a new client with the default option read from the @@ -27,7 +35,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) { defaults = append(defaults, option.WithAPIKey(o)) } if o, ok := os.LookupEnv("CLOUDFLARE_EMAIL"); ok { - defaults = append(defaults, option.WithEmail(o)) + defaults = append(defaults, option.WithAPIEmail(o)) } if o, ok := os.LookupEnv("CLOUDFLARE_API_TOKEN"); ok { defaults = append(defaults, option.WithAPIToken(o)) @@ -36,8 +44,16 @@ func NewClient(opts ...option.RequestOption) (r *Client) { r = &Client{Options: opts} + r.Accounts = NewAccountService(opts...) + r.IPs = NewIPService(opts...) r.Zones = NewZoneService(opts...) r.AI = NewAIService(opts...) + r.LoadBalancers = NewLoadBalancerService(opts...) + r.Access = NewAccessService(opts...) + r.DNSRecords = NewDNSRecordService(opts...) + r.Emails = NewEmailService(opts...) + r.AccountMembers = NewAccountMemberService(opts...) + r.Tunnels = NewTunnelService(opts...) return } diff --git a/dnsrecord.go b/dnsrecord.go new file mode 100644 index 00000000000..9ed295422c8 --- /dev/null +++ b/dnsrecord.go @@ -0,0 +1,14904 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/option" + "github.com/tidwall/gjson" +) + +// DNSRecordService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewDNSRecordService] method instead. +type DNSRecordService struct { + Options []option.RequestOption + Exports *DNSRecordExportService + Imports *DNSRecordImportService + Scans *DNSRecordScanService +} + +// NewDNSRecordService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewDNSRecordService(opts ...option.RequestOption) (r *DNSRecordService) { + r = &DNSRecordService{} + r.Options = opts + r.Exports = NewDNSRecordExportService(opts...) + r.Imports = NewDNSRecordImportService(opts...) + r.Scans = NewDNSRecordScanService(opts...) + return +} + +// DNS Record Details +func (r *DNSRecordService) Get(ctx context.Context, zoneID string, dnsRecordID string, opts ...option.RequestOption) (res *DNSRecordGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records/%s", zoneID, dnsRecordID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Update an existing DNS record. +// +// Notes: +// +// - A/AAAA records cannot exist on the same name as CNAME records. +// - NS records cannot exist on the same name as any other record type. +// - Domain names are always represented in Punycode, even if Unicode characters +// were used when creating the record. +func (r *DNSRecordService) Update(ctx context.Context, zoneID string, dnsRecordID string, body DNSRecordUpdateParams, opts ...option.RequestOption) (res *DNSRecordUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records/%s", zoneID, dnsRecordID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Delete DNS Record +func (r *DNSRecordService) Delete(ctx context.Context, zoneID string, dnsRecordID string, opts ...option.RequestOption) (res *DNSRecordDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + var env DNSRecordDeleteResponseEnvelope + path := fmt.Sprintf("zones/%s/dns_records/%s", zoneID, dnsRecordID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Create a new DNS record for a zone. +// +// Notes: +// +// - A/AAAA records cannot exist on the same name as CNAME records. +// - NS records cannot exist on the same name as any other record type. +// - Domain names are always represented in Punycode, even if Unicode characters +// were used when creating the record. +func (r *DNSRecordService) DNSRecordsForAZoneNewDNSRecord(ctx context.Context, zoneID string, body DNSRecordDNSRecordsForAZoneNewDNSRecordParams, opts ...option.RequestOption) (res *DNSRecordDNSRecordsForAZoneNewDNSRecordResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records", zoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// List, search, sort, and filter a zones' DNS records. +func (r *DNSRecordService) DNSRecordsForAZoneListDNSRecords(ctx context.Context, zoneID string, query DNSRecordDNSRecordsForAZoneListDNSRecordsParams, opts ...option.RequestOption) (res *DNSRecordDNSRecordsForAZoneListDNSRecordsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records", zoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type DNSRecordGetResponse struct { + Errors []DNSRecordGetResponseError `json:"errors"` + Messages []DNSRecordGetResponseMessage `json:"messages"` + Result DNSRecordGetResponseResult `json:"result"` + // Whether the API call was successful + Success DNSRecordGetResponseSuccess `json:"success"` + JSON dnsRecordGetResponseJSON `json:"-"` +} + +// dnsRecordGetResponseJSON contains the JSON metadata for the struct +// [DNSRecordGetResponse] +type dnsRecordGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordGetResponseErrorJSON `json:"-"` +} + +// dnsRecordGetResponseErrorJSON contains the JSON metadata for the struct +// [DNSRecordGetResponseError] +type dnsRecordGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordGetResponseMessageJSON `json:"-"` +} + +// dnsRecordGetResponseMessageJSON contains the JSON metadata for the struct +// [DNSRecordGetResponseMessage] +type dnsRecordGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [DNSRecordGetResponseResultDNSRecordsARecord], +// [DNSRecordGetResponseResultDNSRecordsAaaaRecord], +// [DNSRecordGetResponseResultDNSRecordsCaaRecord], +// [DNSRecordGetResponseResultDNSRecordsCertRecord], +// [DNSRecordGetResponseResultDNSRecordsCnameRecord], +// [DNSRecordGetResponseResultDNSRecordsDnskeyRecord], +// [DNSRecordGetResponseResultDNSRecordsDsRecord], +// [DNSRecordGetResponseResultDNSRecordsHTTPsRecord], +// [DNSRecordGetResponseResultDNSRecordsLocRecord], +// [DNSRecordGetResponseResultDNSRecordsMxRecord], +// [DNSRecordGetResponseResultDNSRecordsNaptrRecord], +// [DNSRecordGetResponseResultDNSRecordsNsRecord], +// [DNSRecordGetResponseResultDNSRecordsPtrRecord], +// [DNSRecordGetResponseResultDNSRecordsSmimeaRecord], +// [DNSRecordGetResponseResultDNSRecordsSrvRecord], +// [DNSRecordGetResponseResultDNSRecordsSshfpRecord], +// [DNSRecordGetResponseResultDNSRecordsSvcbRecord], +// [DNSRecordGetResponseResultDNSRecordsTlsaRecord], +// [DNSRecordGetResponseResultDNSRecordsTxtRecord] or +// [DNSRecordGetResponseResultDNSRecordsUriRecord]. +type DNSRecordGetResponseResult interface { + implementsDNSRecordGetResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*DNSRecordGetResponseResult)(nil)).Elem(), "") +} + +type DNSRecordGetResponseResultDNSRecordsARecord struct { + // A valid IPv4 address. + Content string `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsARecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsARecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsARecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsARecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsARecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsARecord] +type dnsRecordGetResponseResultDNSRecordsARecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsARecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsARecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsARecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsARecordTypeA DNSRecordGetResponseResultDNSRecordsARecordType = "A" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsARecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsARecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsARecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsARecordMeta] +type dnsRecordGetResponseResultDNSRecordsARecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsARecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsARecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsARecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsARecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsARecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsARecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content string `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsAaaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsAaaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsAaaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsAaaaRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsAaaaRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsAaaaRecord] +type dnsRecordGetResponseResultDNSRecordsAaaaRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsAaaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsAaaaRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsAaaaRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsAaaaRecordTypeAaaa DNSRecordGetResponseResultDNSRecordsAaaaRecordType = "AAAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsAaaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsAaaaRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsAaaaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsAaaaRecordMeta] +type dnsRecordGetResponseResultDNSRecordsAaaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsAaaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsAaaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsAaaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsAaaaRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data DNSRecordGetResponseResultDNSRecordsCaaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsCaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CAA content. See 'data' to set CAA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsCaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsCaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsCaaRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCaaRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsCaaRecord] +type dnsRecordGetResponseResultDNSRecordsCaaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsCaaRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a CAA record. +type DNSRecordGetResponseResultDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags float64 `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag string `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value string `json:"value"` + JSON dnsRecordGetResponseResultDNSRecordsCaaRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCaaRecordDataJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsCaaRecordData] +type dnsRecordGetResponseResultDNSRecordsCaaRecordDataJSON struct { + Flags apijson.Field + Tag apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCaaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsCaaRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsCaaRecordTypeCaa DNSRecordGetResponseResultDNSRecordsCaaRecordType = "CAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsCaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsCaaRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCaaRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsCaaRecordMeta] +type dnsRecordGetResponseResultDNSRecordsCaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsCaaRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsCaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsCaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsCaaRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsCertRecord struct { + // Components of a CERT record. + Data DNSRecordGetResponseResultDNSRecordsCertRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsCertRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CERT content. See 'data' to set CERT properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsCertRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsCertRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsCertRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCertRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsCertRecord] +type dnsRecordGetResponseResultDNSRecordsCertRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCertRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsCertRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a CERT record. +type DNSRecordGetResponseResultDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Certificate. + Certificate string `json:"certificate"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + // Type. + Type float64 `json:"type"` + JSON dnsRecordGetResponseResultDNSRecordsCertRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCertRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsCertRecordData] +type dnsRecordGetResponseResultDNSRecordsCertRecordDataJSON struct { + Algorithm apijson.Field + Certificate apijson.Field + KeyTag apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCertRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsCertRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsCertRecordTypeCert DNSRecordGetResponseResultDNSRecordsCertRecordType = "CERT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsCertRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsCertRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCertRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsCertRecordMeta] +type dnsRecordGetResponseResultDNSRecordsCertRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCertRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsCertRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsCertRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsCertRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsCertRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsCnameRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsCnameRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsCnameRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsCnameRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCnameRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsCnameRecord] +type dnsRecordGetResponseResultDNSRecordsCnameRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCnameRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsCnameRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsCnameRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsCnameRecordTypeCname DNSRecordGetResponseResultDNSRecordsCnameRecordType = "CNAME" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsCnameRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsCnameRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsCnameRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsCnameRecordMeta] +type dnsRecordGetResponseResultDNSRecordsCnameRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsCnameRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsCnameRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsCnameRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsCnameRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsCnameRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data DNSRecordGetResponseResultDNSRecordsDnskeyRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsDnskeyRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DNSKEY content. See 'data' to set DNSKEY properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsDnskeyRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsDnskeyRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDnskeyRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsDnskeyRecord] +type dnsRecordGetResponseResultDNSRecordsDnskeyRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDnskeyRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsDnskeyRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a DNSKEY record. +type DNSRecordGetResponseResultDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Flags. + Flags float64 `json:"flags"` + // Protocol. + Protocol float64 `json:"protocol"` + // Public Key. + PublicKey string `json:"public_key"` + JSON dnsRecordGetResponseResultDNSRecordsDnskeyRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDnskeyRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsDnskeyRecordData] +type dnsRecordGetResponseResultDNSRecordsDnskeyRecordDataJSON struct { + Algorithm apijson.Field + Flags apijson.Field + Protocol apijson.Field + PublicKey apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDnskeyRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsDnskeyRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsDnskeyRecordTypeDnskey DNSRecordGetResponseResultDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsDnskeyRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsDnskeyRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDnskeyRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsDnskeyRecordMeta] +type dnsRecordGetResponseResultDNSRecordsDnskeyRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDnskeyRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsDnskeyRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsDsRecord struct { + // Components of a DS record. + Data DNSRecordGetResponseResultDNSRecordsDsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsDsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DS content. See 'data' to set DS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsDsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsDsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsDsRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDsRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsDsRecord] +type dnsRecordGetResponseResultDNSRecordsDsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsDsRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a DS record. +type DNSRecordGetResponseResultDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Digest. + Digest string `json:"digest"` + // Digest Type. + DigestType float64 `json:"digest_type"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + JSON dnsRecordGetResponseResultDNSRecordsDsRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDsRecordDataJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsDsRecordData] +type dnsRecordGetResponseResultDNSRecordsDsRecordDataJSON struct { + Algorithm apijson.Field + Digest apijson.Field + DigestType apijson.Field + KeyTag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsDsRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsDsRecordTypeDs DNSRecordGetResponseResultDNSRecordsDsRecordType = "DS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsDsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsDsRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsDsRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsDsRecordMeta] +type dnsRecordGetResponseResultDNSRecordsDsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsDsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsDsRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsDsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsDsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsDsRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data DNSRecordGetResponseResultDNSRecordsHTTPsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsHTTPsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted HTTPS content. See 'data' to set HTTPS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsHTTPsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsHTTPsRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsHTTPsRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsHTTPsRecord] +type dnsRecordGetResponseResultDNSRecordsHTTPsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsHTTPsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsHTTPsRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a HTTPS record. +type DNSRecordGetResponseResultDNSRecordsHTTPsRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordGetResponseResultDNSRecordsHTTPsRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsHTTPsRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsHTTPsRecordData] +type dnsRecordGetResponseResultDNSRecordsHTTPsRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsHTTPsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsHTTPsRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsHTTPsRecordTypeHTTPs DNSRecordGetResponseResultDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsHTTPsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsHTTPsRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsHTTPsRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsHTTPsRecordMeta] +type dnsRecordGetResponseResultDNSRecordsHTTPsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsHTTPsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsHTTPsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsLocRecord struct { + // Components of a LOC record. + Data DNSRecordGetResponseResultDNSRecordsLocRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsLocRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted LOC content. See 'data' to set LOC properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsLocRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsLocRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsLocRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsLocRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsLocRecord] +type dnsRecordGetResponseResultDNSRecordsLocRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsLocRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsLocRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a LOC record. +type DNSRecordGetResponseResultDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude float64 `json:"altitude"` + // Degrees of latitude. + LatDegrees float64 `json:"lat_degrees"` + // Latitude direction. + LatDirection DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirection `json:"lat_direction"` + // Minutes of latitude. + LatMinutes float64 `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds float64 `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees float64 `json:"long_degrees"` + // Longitude direction. + LongDirection DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirection `json:"long_direction"` + // Minutes of longitude. + LongMinutes float64 `json:"long_minutes"` + // Seconds of longitude. + LongSeconds float64 `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz float64 `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert float64 `json:"precision_vert"` + // Size of location in meters. + Size float64 `json:"size"` + JSON dnsRecordGetResponseResultDNSRecordsLocRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsLocRecordDataJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsLocRecordData] +type dnsRecordGetResponseResultDNSRecordsLocRecordDataJSON struct { + Altitude apijson.Field + LatDegrees apijson.Field + LatDirection apijson.Field + LatMinutes apijson.Field + LatSeconds apijson.Field + LongDegrees apijson.Field + LongDirection apijson.Field + LongMinutes apijson.Field + LongSeconds apijson.Field + PrecisionHorz apijson.Field + PrecisionVert apijson.Field + Size apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsLocRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Latitude direction. +type DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirectionN DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirectionS DNSRecordGetResponseResultDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirectionE DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirectionW DNSRecordGetResponseResultDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordGetResponseResultDNSRecordsLocRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsLocRecordTypeLoc DNSRecordGetResponseResultDNSRecordsLocRecordType = "LOC" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsLocRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsLocRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsLocRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsLocRecordMeta] +type dnsRecordGetResponseResultDNSRecordsLocRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsLocRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsLocRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsLocRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsLocRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsLocRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content string `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsMxRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsMxRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsMxRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsMxRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsMxRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsMxRecord] +type dnsRecordGetResponseResultDNSRecordsMxRecordJSON struct { + Content apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsMxRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsMxRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsMxRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsMxRecordTypeMx DNSRecordGetResponseResultDNSRecordsMxRecordType = "MX" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsMxRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsMxRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsMxRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsMxRecordMeta] +type dnsRecordGetResponseResultDNSRecordsMxRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsMxRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsMxRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsMxRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsMxRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsMxRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data DNSRecordGetResponseResultDNSRecordsNaptrRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsNaptrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted NAPTR content. See 'data' to set NAPTR properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsNaptrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsNaptrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsNaptrRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsNaptrRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsNaptrRecord] +type dnsRecordGetResponseResultDNSRecordsNaptrRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsNaptrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsNaptrRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a NAPTR record. +type DNSRecordGetResponseResultDNSRecordsNaptrRecordData struct { + // Flags. + Flags string `json:"flags"` + // Order. + Order float64 `json:"order"` + // Preference. + Preference float64 `json:"preference"` + // Regex. + Regex string `json:"regex"` + // Replacement. + Replacement string `json:"replacement"` + // Service. + Service string `json:"service"` + JSON dnsRecordGetResponseResultDNSRecordsNaptrRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsNaptrRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsNaptrRecordData] +type dnsRecordGetResponseResultDNSRecordsNaptrRecordDataJSON struct { + Flags apijson.Field + Order apijson.Field + Preference apijson.Field + Regex apijson.Field + Replacement apijson.Field + Service apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsNaptrRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsNaptrRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsNaptrRecordTypeNaptr DNSRecordGetResponseResultDNSRecordsNaptrRecordType = "NAPTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsNaptrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsNaptrRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsNaptrRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsNaptrRecordMeta] +type dnsRecordGetResponseResultDNSRecordsNaptrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsNaptrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsNaptrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsNaptrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsNaptrRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsNsRecord struct { + // A valid name server host name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsNsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsNsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsNsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsNsRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsNsRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsNsRecord] +type dnsRecordGetResponseResultDNSRecordsNsRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsNsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsNsRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsNsRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsNsRecordTypeNs DNSRecordGetResponseResultDNSRecordsNsRecordType = "NS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsNsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsNsRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsNsRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsNsRecordMeta] +type dnsRecordGetResponseResultDNSRecordsNsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsNsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsNsRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsNsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsNsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsNsRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsPtrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsPtrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsPtrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsPtrRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsPtrRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsPtrRecord] +type dnsRecordGetResponseResultDNSRecordsPtrRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsPtrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsPtrRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsPtrRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsPtrRecordTypePtr DNSRecordGetResponseResultDNSRecordsPtrRecordType = "PTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsPtrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsPtrRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsPtrRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsPtrRecordMeta] +type dnsRecordGetResponseResultDNSRecordsPtrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsPtrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsPtrRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsPtrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsPtrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsPtrRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data DNSRecordGetResponseResultDNSRecordsSmimeaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsSmimeaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SMIMEA content. See 'data' to set SMIMEA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsSmimeaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsSmimeaRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSmimeaRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsSmimeaRecord] +type dnsRecordGetResponseResultDNSRecordsSmimeaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSmimeaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsSmimeaRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a SMIMEA record. +type DNSRecordGetResponseResultDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordGetResponseResultDNSRecordsSmimeaRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSmimeaRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSmimeaRecordData] +type dnsRecordGetResponseResultDNSRecordsSmimeaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSmimeaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsSmimeaRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsSmimeaRecordTypeSmimea DNSRecordGetResponseResultDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsSmimeaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsSmimeaRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSmimeaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSmimeaRecordMeta] +type dnsRecordGetResponseResultDNSRecordsSmimeaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSmimeaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsSmimeaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data DNSRecordGetResponseResultDNSRecordsSrvRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsSrvRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Priority, weight, port, and SRV target. See 'data' for setting the individual + // component values. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsSrvRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsSrvRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsSrvRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSrvRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsSrvRecord] +type dnsRecordGetResponseResultDNSRecordsSrvRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSrvRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsSrvRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a SRV record. +type DNSRecordGetResponseResultDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name string `json:"name" format:"hostname"` + // The port of the service. + Port float64 `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto string `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service string `json:"service"` + // A valid hostname. + Target string `json:"target" format:"hostname"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordGetResponseResultDNSRecordsSrvRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSrvRecordDataJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsSrvRecordData] +type dnsRecordGetResponseResultDNSRecordsSrvRecordDataJSON struct { + Name apijson.Field + Port apijson.Field + Priority apijson.Field + Proto apijson.Field + Service apijson.Field + Target apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSrvRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsSrvRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsSrvRecordTypeSrv DNSRecordGetResponseResultDNSRecordsSrvRecordType = "SRV" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsSrvRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsSrvRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSrvRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsSrvRecordMeta] +type dnsRecordGetResponseResultDNSRecordsSrvRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSrvRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsSrvRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsSrvRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsSrvRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsSrvRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data DNSRecordGetResponseResultDNSRecordsSshfpRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsSshfpRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SSHFP content. See 'data' to set SSHFP properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsSshfpRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsSshfpRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsSshfpRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSshfpRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsSshfpRecord] +type dnsRecordGetResponseResultDNSRecordsSshfpRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSshfpRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsSshfpRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a SSHFP record. +type DNSRecordGetResponseResultDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm float64 `json:"algorithm"` + // fingerprint. + Fingerprint string `json:"fingerprint"` + // type. + Type float64 `json:"type"` + JSON dnsRecordGetResponseResultDNSRecordsSshfpRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSshfpRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSshfpRecordData] +type dnsRecordGetResponseResultDNSRecordsSshfpRecordDataJSON struct { + Algorithm apijson.Field + Fingerprint apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSshfpRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsSshfpRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsSshfpRecordTypeSshfp DNSRecordGetResponseResultDNSRecordsSshfpRecordType = "SSHFP" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsSshfpRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsSshfpRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSshfpRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSshfpRecordMeta] +type dnsRecordGetResponseResultDNSRecordsSshfpRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSshfpRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsSshfpRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsSshfpRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsSshfpRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data DNSRecordGetResponseResultDNSRecordsSvcbRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsSvcbRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SVCB content. See 'data' to set SVCB properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsSvcbRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsSvcbRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsSvcbRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSvcbRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsSvcbRecord] +type dnsRecordGetResponseResultDNSRecordsSvcbRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSvcbRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsSvcbRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a SVCB record. +type DNSRecordGetResponseResultDNSRecordsSvcbRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordGetResponseResultDNSRecordsSvcbRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSvcbRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSvcbRecordData] +type dnsRecordGetResponseResultDNSRecordsSvcbRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSvcbRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsSvcbRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsSvcbRecordTypeSvcb DNSRecordGetResponseResultDNSRecordsSvcbRecordType = "SVCB" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsSvcbRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsSvcbRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsSvcbRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsSvcbRecordMeta] +type dnsRecordGetResponseResultDNSRecordsSvcbRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsSvcbRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsSvcbRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsSvcbRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsSvcbRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data DNSRecordGetResponseResultDNSRecordsTlsaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsTlsaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted TLSA content. See 'data' to set TLSA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsTlsaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsTlsaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsTlsaRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsTlsaRecordJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsTlsaRecord] +type dnsRecordGetResponseResultDNSRecordsTlsaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsTlsaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsTlsaRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a TLSA record. +type DNSRecordGetResponseResultDNSRecordsTlsaRecordData struct { + // certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordGetResponseResultDNSRecordsTlsaRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsTlsaRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsTlsaRecordData] +type dnsRecordGetResponseResultDNSRecordsTlsaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsTlsaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsTlsaRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsTlsaRecordTypeTlsa DNSRecordGetResponseResultDNSRecordsTlsaRecordType = "TLSA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsTlsaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsTlsaRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsTlsaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordGetResponseResultDNSRecordsTlsaRecordMeta] +type dnsRecordGetResponseResultDNSRecordsTlsaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsTlsaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsTlsaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsTlsaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsTlsaRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsTxtRecord struct { + // Text content for the record. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsTxtRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsTxtRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsTxtRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsTxtRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsTxtRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsTxtRecord] +type dnsRecordGetResponseResultDNSRecordsTxtRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsTxtRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsTxtRecord) implementsDNSRecordGetResponseResult() {} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsTxtRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsTxtRecordTypeTxt DNSRecordGetResponseResultDNSRecordsTxtRecordType = "TXT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsTxtRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsTxtRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsTxtRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsTxtRecordMeta] +type dnsRecordGetResponseResultDNSRecordsTxtRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsTxtRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsTxtRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsTxtRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsTxtRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsTxtRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordGetResponseResultDNSRecordsUriRecord struct { + // Components of a URI record. + Data DNSRecordGetResponseResultDNSRecordsUriRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordGetResponseResultDNSRecordsUriRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted URI content. See 'data' to set URI properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordGetResponseResultDNSRecordsUriRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordGetResponseResultDNSRecordsUriRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordGetResponseResultDNSRecordsUriRecordJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsUriRecordJSON contains the JSON metadata for +// the struct [DNSRecordGetResponseResultDNSRecordsUriRecord] +type dnsRecordGetResponseResultDNSRecordsUriRecordJSON struct { + Data apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsUriRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordGetResponseResultDNSRecordsUriRecord) implementsDNSRecordGetResponseResult() {} + +// Components of a URI record. +type DNSRecordGetResponseResultDNSRecordsUriRecordData struct { + // The record content. + Content string `json:"content"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordGetResponseResultDNSRecordsUriRecordDataJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsUriRecordDataJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsUriRecordData] +type dnsRecordGetResponseResultDNSRecordsUriRecordDataJSON struct { + Content apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsUriRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordGetResponseResultDNSRecordsUriRecordType string + +const ( + DNSRecordGetResponseResultDNSRecordsUriRecordTypeUri DNSRecordGetResponseResultDNSRecordsUriRecordType = "URI" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordGetResponseResultDNSRecordsUriRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordGetResponseResultDNSRecordsUriRecordMetaJSON `json:"-"` +} + +// dnsRecordGetResponseResultDNSRecordsUriRecordMetaJSON contains the JSON metadata +// for the struct [DNSRecordGetResponseResultDNSRecordsUriRecordMeta] +type dnsRecordGetResponseResultDNSRecordsUriRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordGetResponseResultDNSRecordsUriRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordGetResponseResultDNSRecordsUriRecordTTLNumber]. +type DNSRecordGetResponseResultDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordGetResponseResultDNSRecordsUriRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordGetResponseResultDNSRecordsUriRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordGetResponseResultDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordGetResponseResultDNSRecordsUriRecordTTLNumber1 DNSRecordGetResponseResultDNSRecordsUriRecordTTLNumber = 1 +) + +// Whether the API call was successful +type DNSRecordGetResponseSuccess bool + +const ( + DNSRecordGetResponseSuccessTrue DNSRecordGetResponseSuccess = true +) + +type DNSRecordUpdateResponse struct { + Errors []DNSRecordUpdateResponseError `json:"errors"` + Messages []DNSRecordUpdateResponseMessage `json:"messages"` + Result DNSRecordUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success DNSRecordUpdateResponseSuccess `json:"success"` + JSON dnsRecordUpdateResponseJSON `json:"-"` +} + +// dnsRecordUpdateResponseJSON contains the JSON metadata for the struct +// [DNSRecordUpdateResponse] +type dnsRecordUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordUpdateResponseErrorJSON `json:"-"` +} + +// dnsRecordUpdateResponseErrorJSON contains the JSON metadata for the struct +// [DNSRecordUpdateResponseError] +type dnsRecordUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordUpdateResponseMessageJSON `json:"-"` +} + +// dnsRecordUpdateResponseMessageJSON contains the JSON metadata for the struct +// [DNSRecordUpdateResponseMessage] +type dnsRecordUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [DNSRecordUpdateResponseResultDNSRecordsARecord], +// [DNSRecordUpdateResponseResultDNSRecordsAaaaRecord], +// [DNSRecordUpdateResponseResultDNSRecordsCaaRecord], +// [DNSRecordUpdateResponseResultDNSRecordsCertRecord], +// [DNSRecordUpdateResponseResultDNSRecordsCnameRecord], +// [DNSRecordUpdateResponseResultDNSRecordsDnskeyRecord], +// [DNSRecordUpdateResponseResultDNSRecordsDsRecord], +// [DNSRecordUpdateResponseResultDNSRecordsHTTPsRecord], +// [DNSRecordUpdateResponseResultDNSRecordsLocRecord], +// [DNSRecordUpdateResponseResultDNSRecordsMxRecord], +// [DNSRecordUpdateResponseResultDNSRecordsNaptrRecord], +// [DNSRecordUpdateResponseResultDNSRecordsNsRecord], +// [DNSRecordUpdateResponseResultDNSRecordsPtrRecord], +// [DNSRecordUpdateResponseResultDNSRecordsSmimeaRecord], +// [DNSRecordUpdateResponseResultDNSRecordsSrvRecord], +// [DNSRecordUpdateResponseResultDNSRecordsSshfpRecord], +// [DNSRecordUpdateResponseResultDNSRecordsSvcbRecord], +// [DNSRecordUpdateResponseResultDNSRecordsTlsaRecord], +// [DNSRecordUpdateResponseResultDNSRecordsTxtRecord] or +// [DNSRecordUpdateResponseResultDNSRecordsUriRecord]. +type DNSRecordUpdateResponseResult interface { + implementsDNSRecordUpdateResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*DNSRecordUpdateResponseResult)(nil)).Elem(), "") +} + +type DNSRecordUpdateResponseResultDNSRecordsARecord struct { + // A valid IPv4 address. + Content string `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsARecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsARecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsARecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsARecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsARecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsARecord] +type dnsRecordUpdateResponseResultDNSRecordsARecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsARecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsARecord) implementsDNSRecordUpdateResponseResult() {} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsARecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsARecordTypeA DNSRecordUpdateResponseResultDNSRecordsARecordType = "A" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsARecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsARecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsARecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsARecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsARecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsARecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsARecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsARecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsARecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsARecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsARecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content string `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsAaaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsAaaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsAaaaRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsAaaaRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsAaaaRecord] +type dnsRecordUpdateResponseResultDNSRecordsAaaaRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsAaaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsAaaaRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsAaaaRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTypeAaaa DNSRecordUpdateResponseResultDNSRecordsAaaaRecordType = "AAAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsAaaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsAaaaRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsAaaaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsAaaaRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsAaaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsAaaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data DNSRecordUpdateResponseResultDNSRecordsCaaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsCaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CAA content. See 'data' to set CAA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsCaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsCaaRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCaaRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsCaaRecord] +type dnsRecordUpdateResponseResultDNSRecordsCaaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsCaaRecord) implementsDNSRecordUpdateResponseResult() {} + +// Components of a CAA record. +type DNSRecordUpdateResponseResultDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags float64 `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag string `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value string `json:"value"` + JSON dnsRecordUpdateResponseResultDNSRecordsCaaRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCaaRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCaaRecordData] +type dnsRecordUpdateResponseResultDNSRecordsCaaRecordDataJSON struct { + Flags apijson.Field + Tag apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCaaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsCaaRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsCaaRecordTypeCaa DNSRecordUpdateResponseResultDNSRecordsCaaRecordType = "CAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsCaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsCaaRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCaaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCaaRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsCaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsCaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsCertRecord struct { + // Components of a CERT record. + Data DNSRecordUpdateResponseResultDNSRecordsCertRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsCertRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CERT content. See 'data' to set CERT properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsCertRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsCertRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsCertRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCertRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsCertRecord] +type dnsRecordUpdateResponseResultDNSRecordsCertRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCertRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsCertRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a CERT record. +type DNSRecordUpdateResponseResultDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Certificate. + Certificate string `json:"certificate"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + // Type. + Type float64 `json:"type"` + JSON dnsRecordUpdateResponseResultDNSRecordsCertRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCertRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCertRecordData] +type dnsRecordUpdateResponseResultDNSRecordsCertRecordDataJSON struct { + Algorithm apijson.Field + Certificate apijson.Field + KeyTag apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCertRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsCertRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsCertRecordTypeCert DNSRecordUpdateResponseResultDNSRecordsCertRecordType = "CERT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsCertRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsCertRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCertRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCertRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsCertRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCertRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsCertRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsCertRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsCertRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsCertRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsCnameRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsCnameRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsCnameRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCnameRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCnameRecord] +type dnsRecordUpdateResponseResultDNSRecordsCnameRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCnameRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsCnameRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsCnameRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsCnameRecordTypeCname DNSRecordUpdateResponseResultDNSRecordsCnameRecordType = "CNAME" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsCnameRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsCnameRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsCnameRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsCnameRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsCnameRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsCnameRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsCnameRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DNSKEY content. See 'data' to set DNSKEY properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsDnskeyRecord] +type dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDnskeyRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsDnskeyRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a DNSKEY record. +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Flags. + Flags float64 `json:"flags"` + // Protocol. + Protocol float64 `json:"protocol"` + // Public Key. + PublicKey string `json:"public_key"` + JSON dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordDataJSON contains the JSON +// metadata for the struct +// [DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordData] +type dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordDataJSON struct { + Algorithm apijson.Field + Flags apijson.Field + Protocol apijson.Field + PublicKey apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTypeDnskey DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordMetaJSON contains the JSON +// metadata for the struct +// [DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsDnskeyRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsDsRecord struct { + // Components of a DS record. + Data DNSRecordUpdateResponseResultDNSRecordsDsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsDsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DS content. See 'data' to set DS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsDsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsDsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsDsRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDsRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsDsRecord] +type dnsRecordUpdateResponseResultDNSRecordsDsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsDsRecord) implementsDNSRecordUpdateResponseResult() {} + +// Components of a DS record. +type DNSRecordUpdateResponseResultDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Digest. + Digest string `json:"digest"` + // Digest Type. + DigestType float64 `json:"digest_type"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + JSON dnsRecordUpdateResponseResultDNSRecordsDsRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDsRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsDsRecordData] +type dnsRecordUpdateResponseResultDNSRecordsDsRecordDataJSON struct { + Algorithm apijson.Field + Digest apijson.Field + DigestType apijson.Field + KeyTag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsDsRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsDsRecordTypeDs DNSRecordUpdateResponseResultDNSRecordsDsRecordType = "DS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsDsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsDsRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsDsRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsDsRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsDsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsDsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsDsRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsDsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsDsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsDsRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted HTTPS content. See 'data' to set HTTPS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsHTTPsRecord] +type dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsHTTPsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsHTTPsRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a HTTPS record. +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordData] +type dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTypeHTTPs DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsHTTPsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsLocRecord struct { + // Components of a LOC record. + Data DNSRecordUpdateResponseResultDNSRecordsLocRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsLocRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted LOC content. See 'data' to set LOC properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsLocRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsLocRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsLocRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsLocRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsLocRecord] +type dnsRecordUpdateResponseResultDNSRecordsLocRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsLocRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsLocRecord) implementsDNSRecordUpdateResponseResult() {} + +// Components of a LOC record. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude float64 `json:"altitude"` + // Degrees of latitude. + LatDegrees float64 `json:"lat_degrees"` + // Latitude direction. + LatDirection DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirection `json:"lat_direction"` + // Minutes of latitude. + LatMinutes float64 `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds float64 `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees float64 `json:"long_degrees"` + // Longitude direction. + LongDirection DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirection `json:"long_direction"` + // Minutes of longitude. + LongMinutes float64 `json:"long_minutes"` + // Seconds of longitude. + LongSeconds float64 `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz float64 `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert float64 `json:"precision_vert"` + // Size of location in meters. + Size float64 `json:"size"` + JSON dnsRecordUpdateResponseResultDNSRecordsLocRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsLocRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsLocRecordData] +type dnsRecordUpdateResponseResultDNSRecordsLocRecordDataJSON struct { + Altitude apijson.Field + LatDegrees apijson.Field + LatDirection apijson.Field + LatMinutes apijson.Field + LatSeconds apijson.Field + LongDegrees apijson.Field + LongDirection apijson.Field + LongMinutes apijson.Field + LongSeconds apijson.Field + PrecisionHorz apijson.Field + PrecisionVert apijson.Field + Size apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsLocRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Latitude direction. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirectionN DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirectionS DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirectionE DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirectionW DNSRecordUpdateResponseResultDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsLocRecordTypeLoc DNSRecordUpdateResponseResultDNSRecordsLocRecordType = "LOC" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsLocRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsLocRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsLocRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsLocRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsLocRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsLocRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsLocRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsLocRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsLocRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content string `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsMxRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsMxRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsMxRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsMxRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsMxRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsMxRecord] +type dnsRecordUpdateResponseResultDNSRecordsMxRecordJSON struct { + Content apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsMxRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsMxRecord) implementsDNSRecordUpdateResponseResult() {} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsMxRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsMxRecordTypeMx DNSRecordUpdateResponseResultDNSRecordsMxRecordType = "MX" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsMxRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsMxRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsMxRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsMxRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsMxRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsMxRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsMxRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsMxRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsMxRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsMxRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data DNSRecordUpdateResponseResultDNSRecordsNaptrRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted NAPTR content. See 'data' to set NAPTR properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsNaptrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsNaptrRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsNaptrRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsNaptrRecord] +type dnsRecordUpdateResponseResultDNSRecordsNaptrRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsNaptrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsNaptrRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a NAPTR record. +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordData struct { + // Flags. + Flags string `json:"flags"` + // Order. + Order float64 `json:"order"` + // Preference. + Preference float64 `json:"preference"` + // Regex. + Regex string `json:"regex"` + // Replacement. + Replacement string `json:"replacement"` + // Service. + Service string `json:"service"` + JSON dnsRecordUpdateResponseResultDNSRecordsNaptrRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsNaptrRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsNaptrRecordData] +type dnsRecordUpdateResponseResultDNSRecordsNaptrRecordDataJSON struct { + Flags apijson.Field + Order apijson.Field + Preference apijson.Field + Regex apijson.Field + Replacement apijson.Field + Service apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsNaptrRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTypeNaptr DNSRecordUpdateResponseResultDNSRecordsNaptrRecordType = "NAPTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsNaptrRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsNaptrRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsNaptrRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsNaptrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsNaptrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsNsRecord struct { + // A valid name server host name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsNsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsNsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsNsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsNsRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsNsRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsNsRecord] +type dnsRecordUpdateResponseResultDNSRecordsNsRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsNsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsNsRecord) implementsDNSRecordUpdateResponseResult() {} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsNsRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsNsRecordTypeNs DNSRecordUpdateResponseResultDNSRecordsNsRecordType = "NS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsNsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsNsRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsNsRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsNsRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsNsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsNsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsNsRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsNsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsNsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsNsRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsPtrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsPtrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsPtrRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsPtrRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsPtrRecord] +type dnsRecordUpdateResponseResultDNSRecordsPtrRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsPtrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsPtrRecord) implementsDNSRecordUpdateResponseResult() {} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsPtrRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsPtrRecordTypePtr DNSRecordUpdateResponseResultDNSRecordsPtrRecordType = "PTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsPtrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsPtrRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsPtrRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsPtrRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsPtrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsPtrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsPtrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SMIMEA content. See 'data' to set SMIMEA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSmimeaRecord] +type dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSmimeaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsSmimeaRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a SMIMEA record. +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordDataJSON contains the JSON +// metadata for the struct +// [DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordData] +type dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTypeSmimea DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordMetaJSON contains the JSON +// metadata for the struct +// [DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsSmimeaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data DNSRecordUpdateResponseResultDNSRecordsSrvRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsSrvRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Priority, weight, port, and SRV target. See 'data' for setting the individual + // component values. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsSrvRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsSrvRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSrvRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsSrvRecord] +type dnsRecordUpdateResponseResultDNSRecordsSrvRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSrvRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsSrvRecord) implementsDNSRecordUpdateResponseResult() {} + +// Components of a SRV record. +type DNSRecordUpdateResponseResultDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name string `json:"name" format:"hostname"` + // The port of the service. + Port float64 `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto string `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service string `json:"service"` + // A valid hostname. + Target string `json:"target" format:"hostname"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordUpdateResponseResultDNSRecordsSrvRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSrvRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSrvRecordData] +type dnsRecordUpdateResponseResultDNSRecordsSrvRecordDataJSON struct { + Name apijson.Field + Port apijson.Field + Priority apijson.Field + Proto apijson.Field + Service apijson.Field + Target apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSrvRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsSrvRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsSrvRecordTypeSrv DNSRecordUpdateResponseResultDNSRecordsSrvRecordType = "SRV" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsSrvRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsSrvRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSrvRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSrvRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsSrvRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSrvRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsSrvRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data DNSRecordUpdateResponseResultDNSRecordsSshfpRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SSHFP content. See 'data' to set SSHFP properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsSshfpRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsSshfpRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSshfpRecordJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSshfpRecord] +type dnsRecordUpdateResponseResultDNSRecordsSshfpRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSshfpRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsSshfpRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a SSHFP record. +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm float64 `json:"algorithm"` + // fingerprint. + Fingerprint string `json:"fingerprint"` + // type. + Type float64 `json:"type"` + JSON dnsRecordUpdateResponseResultDNSRecordsSshfpRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSshfpRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSshfpRecordData] +type dnsRecordUpdateResponseResultDNSRecordsSshfpRecordDataJSON struct { + Algorithm apijson.Field + Fingerprint apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSshfpRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTypeSshfp DNSRecordUpdateResponseResultDNSRecordsSshfpRecordType = "SSHFP" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsSshfpRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSshfpRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSshfpRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsSshfpRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSshfpRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data DNSRecordUpdateResponseResultDNSRecordsSvcbRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SVCB content. See 'data' to set SVCB properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsSvcbRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsSvcbRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSvcbRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsSvcbRecord] +type dnsRecordUpdateResponseResultDNSRecordsSvcbRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSvcbRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsSvcbRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a SVCB record. +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordUpdateResponseResultDNSRecordsSvcbRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSvcbRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSvcbRecordData] +type dnsRecordUpdateResponseResultDNSRecordsSvcbRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSvcbRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTypeSvcb DNSRecordUpdateResponseResultDNSRecordsSvcbRecordType = "SVCB" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsSvcbRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsSvcbRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsSvcbRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsSvcbRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsSvcbRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data DNSRecordUpdateResponseResultDNSRecordsTlsaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted TLSA content. See 'data' to set TLSA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsTlsaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsTlsaRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsTlsaRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsTlsaRecord] +type dnsRecordUpdateResponseResultDNSRecordsTlsaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsTlsaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsTlsaRecord) implementsDNSRecordUpdateResponseResult() { +} + +// Components of a TLSA record. +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordData struct { + // certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordUpdateResponseResultDNSRecordsTlsaRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsTlsaRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsTlsaRecordData] +type dnsRecordUpdateResponseResultDNSRecordsTlsaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsTlsaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTypeTlsa DNSRecordUpdateResponseResultDNSRecordsTlsaRecordType = "TLSA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsTlsaRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsTlsaRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsTlsaRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsTlsaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsTlsaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsTxtRecord struct { + // Text content for the record. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsTxtRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsTxtRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsTxtRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsTxtRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsTxtRecord] +type dnsRecordUpdateResponseResultDNSRecordsTxtRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsTxtRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsTxtRecord) implementsDNSRecordUpdateResponseResult() {} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsTxtRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsTxtRecordTypeTxt DNSRecordUpdateResponseResultDNSRecordsTxtRecordType = "TXT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsTxtRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsTxtRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsTxtRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsTxtRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsTxtRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsTxtRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsTxtRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordUpdateResponseResultDNSRecordsUriRecord struct { + // Components of a URI record. + Data DNSRecordUpdateResponseResultDNSRecordsUriRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordUpdateResponseResultDNSRecordsUriRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted URI content. See 'data' to set URI properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordUpdateResponseResultDNSRecordsUriRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordUpdateResponseResultDNSRecordsUriRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordUpdateResponseResultDNSRecordsUriRecordJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsUriRecordJSON contains the JSON metadata +// for the struct [DNSRecordUpdateResponseResultDNSRecordsUriRecord] +type dnsRecordUpdateResponseResultDNSRecordsUriRecordJSON struct { + Data apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsUriRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordUpdateResponseResultDNSRecordsUriRecord) implementsDNSRecordUpdateResponseResult() {} + +// Components of a URI record. +type DNSRecordUpdateResponseResultDNSRecordsUriRecordData struct { + // The record content. + Content string `json:"content"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordUpdateResponseResultDNSRecordsUriRecordDataJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsUriRecordDataJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsUriRecordData] +type dnsRecordUpdateResponseResultDNSRecordsUriRecordDataJSON struct { + Content apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsUriRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordUpdateResponseResultDNSRecordsUriRecordType string + +const ( + DNSRecordUpdateResponseResultDNSRecordsUriRecordTypeUri DNSRecordUpdateResponseResultDNSRecordsUriRecordType = "URI" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordUpdateResponseResultDNSRecordsUriRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordUpdateResponseResultDNSRecordsUriRecordMetaJSON `json:"-"` +} + +// dnsRecordUpdateResponseResultDNSRecordsUriRecordMetaJSON contains the JSON +// metadata for the struct [DNSRecordUpdateResponseResultDNSRecordsUriRecordMeta] +type dnsRecordUpdateResponseResultDNSRecordsUriRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordUpdateResponseResultDNSRecordsUriRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordUpdateResponseResultDNSRecordsUriRecordTTLNumber]. +type DNSRecordUpdateResponseResultDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordUpdateResponseResultDNSRecordsUriRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordUpdateResponseResultDNSRecordsUriRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordUpdateResponseResultDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordUpdateResponseResultDNSRecordsUriRecordTTLNumber1 DNSRecordUpdateResponseResultDNSRecordsUriRecordTTLNumber = 1 +) + +// Whether the API call was successful +type DNSRecordUpdateResponseSuccess bool + +const ( + DNSRecordUpdateResponseSuccessTrue DNSRecordUpdateResponseSuccess = true +) + +type DNSRecordDeleteResponse struct { + // Identifier + ID string `json:"id"` + JSON dnsRecordDeleteResponseJSON `json:"-"` +} + +// dnsRecordDeleteResponseJSON contains the JSON metadata for the struct +// [DNSRecordDeleteResponse] +type dnsRecordDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponse struct { + Errors []DNSRecordDNSRecordsForAZoneNewDNSRecordResponseError `json:"errors"` + Messages []DNSRecordDNSRecordsForAZoneNewDNSRecordResponseMessage `json:"messages"` + Result DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult `json:"result"` + // Whether the API call was successful + Success DNSRecordDNSRecordsForAZoneNewDNSRecordResponseSuccess `json:"success"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseJSON contains the JSON metadata +// for the struct [DNSRecordDNSRecordsForAZoneNewDNSRecordResponse] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseErrorJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseErrorJSON contains the JSON +// metadata for the struct [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseError] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseMessageJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseMessageJSON contains the JSON +// metadata for the struct [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseMessage] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecord] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecord]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult interface { + implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult)(nil)).Elem(), "") +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecord struct { + // A valid IPv4 address. + Content string `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTypeA DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordType = "A" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content string `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTypeAaaa DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordType = "AAAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CAA content. See 'data' to set CAA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a CAA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags float64 `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag string `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordDataJSON struct { + Flags apijson.Field + Tag apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTypeCaa DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordType = "CAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecord struct { + // Components of a CERT record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CERT content. See 'data' to set CERT properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a CERT record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Certificate. + Certificate string `json:"certificate"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + // Type. + Type float64 `json:"type"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordDataJSON struct { + Algorithm apijson.Field + Certificate apijson.Field + KeyTag apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTypeCert DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordType = "CERT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTypeCname DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordType = "CNAME" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DNSKEY content. See 'data' to set DNSKEY properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a DNSKEY record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Flags. + Flags float64 `json:"flags"` + // Protocol. + Protocol float64 `json:"protocol"` + // Public Key. + PublicKey string `json:"public_key"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordDataJSON struct { + Algorithm apijson.Field + Flags apijson.Field + Protocol apijson.Field + PublicKey apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTypeDnskey DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecord struct { + // Components of a DS record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DS content. See 'data' to set DS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a DS record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Digest. + Digest string `json:"digest"` + // Digest Type. + DigestType float64 `json:"digest_type"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordDataJSON struct { + Algorithm apijson.Field + Digest apijson.Field + DigestType apijson.Field + KeyTag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTypeDs DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordType = "DS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted HTTPS content. See 'data' to set HTTPS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a HTTPS record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTypeHTTPs DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecord struct { + // Components of a LOC record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted LOC content. See 'data' to set LOC properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a LOC record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude float64 `json:"altitude"` + // Degrees of latitude. + LatDegrees float64 `json:"lat_degrees"` + // Latitude direction. + LatDirection DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirection `json:"lat_direction"` + // Minutes of latitude. + LatMinutes float64 `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds float64 `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees float64 `json:"long_degrees"` + // Longitude direction. + LongDirection DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirection `json:"long_direction"` + // Minutes of longitude. + LongMinutes float64 `json:"long_minutes"` + // Seconds of longitude. + LongSeconds float64 `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz float64 `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert float64 `json:"precision_vert"` + // Size of location in meters. + Size float64 `json:"size"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataJSON struct { + Altitude apijson.Field + LatDegrees apijson.Field + LatDirection apijson.Field + LatMinutes apijson.Field + LatSeconds apijson.Field + LongDegrees apijson.Field + LongDirection apijson.Field + LongMinutes apijson.Field + LongSeconds apijson.Field + PrecisionHorz apijson.Field + PrecisionVert apijson.Field + Size apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Latitude direction. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirectionN DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirectionS DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirectionE DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirectionW DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTypeLoc DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordType = "LOC" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content string `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordJSON struct { + Content apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTypeMx DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordType = "MX" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted NAPTR content. See 'data' to set NAPTR properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a NAPTR record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordData struct { + // Flags. + Flags string `json:"flags"` + // Order. + Order float64 `json:"order"` + // Preference. + Preference float64 `json:"preference"` + // Regex. + Regex string `json:"regex"` + // Replacement. + Replacement string `json:"replacement"` + // Service. + Service string `json:"service"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordDataJSON struct { + Flags apijson.Field + Order apijson.Field + Preference apijson.Field + Regex apijson.Field + Replacement apijson.Field + Service apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTypeNaptr DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordType = "NAPTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecord struct { + // A valid name server host name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTypeNs DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordType = "NS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTypePtr DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordType = "PTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SMIMEA content. See 'data' to set SMIMEA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a SMIMEA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTypeSmimea DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Priority, weight, port, and SRV target. See 'data' for setting the individual + // component values. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a SRV record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name string `json:"name" format:"hostname"` + // The port of the service. + Port float64 `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto string `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service string `json:"service"` + // A valid hostname. + Target string `json:"target" format:"hostname"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordDataJSON struct { + Name apijson.Field + Port apijson.Field + Priority apijson.Field + Proto apijson.Field + Service apijson.Field + Target apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTypeSrv DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordType = "SRV" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SSHFP content. See 'data' to set SSHFP properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a SSHFP record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm float64 `json:"algorithm"` + // fingerprint. + Fingerprint string `json:"fingerprint"` + // type. + Type float64 `json:"type"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordDataJSON struct { + Algorithm apijson.Field + Fingerprint apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTypeSshfp DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordType = "SSHFP" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SVCB content. See 'data' to set SVCB properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a SVCB record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTypeSvcb DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordType = "SVCB" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted TLSA content. See 'data' to set TLSA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a TLSA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordData struct { + // certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTypeTlsa DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordType = "TLSA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecord struct { + // Text content for the record. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTypeTxt DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordType = "TXT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecord struct { + // Components of a URI record. + Data DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted URI content. See 'data' to set URI properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecord] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordJSON struct { + Data apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecord) implementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResult() { +} + +// Components of a URI record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordData struct { + // The record content. + Content string `json:"content"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordData] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordDataJSON struct { + Content apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTypeUri DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordType = "URI" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMeta] +type dnsRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTLNumber = 1 +) + +// Whether the API call was successful +type DNSRecordDNSRecordsForAZoneNewDNSRecordResponseSuccess bool + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordResponseSuccessTrue DNSRecordDNSRecordsForAZoneNewDNSRecordResponseSuccess = true +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponse struct { + Errors []DNSRecordDNSRecordsForAZoneListDNSRecordsResponseError `json:"errors"` + Messages []DNSRecordDNSRecordsForAZoneListDNSRecordsResponseMessage `json:"messages"` + Result []DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult `json:"result"` + ResultInfo DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success DNSRecordDNSRecordsForAZoneListDNSRecordsResponseSuccess `json:"success"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseJSON contains the JSON metadata +// for the struct [DNSRecordDNSRecordsForAZoneListDNSRecordsResponse] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseErrorJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseErrorJSON contains the JSON +// metadata for the struct [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseError] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseMessageJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseMessageJSON contains the JSON +// metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseMessage] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecord], +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecord] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecord]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult interface { + implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult)(nil)).Elem(), "") +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecord struct { + // A valid IPv4 address. + Content string `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTypeA DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordType = "A" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content string `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTypeAaaa DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordType = "AAAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CAA content. See 'data' to set CAA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a CAA record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags float64 `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag string `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordDataJSON struct { + Flags apijson.Field + Tag apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTypeCaa DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordType = "CAA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecord struct { + // Components of a CERT record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted CERT content. See 'data' to set CERT properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a CERT record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Certificate. + Certificate string `json:"certificate"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + // Type. + Type float64 `json:"type"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordDataJSON struct { + Algorithm apijson.Field + Certificate apijson.Field + KeyTag apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTypeCert DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordType = "CERT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied bool `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Proxied apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTypeCname DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordType = "CNAME" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DNSKEY content. See 'data' to set DNSKEY properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a DNSKEY record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Flags. + Flags float64 `json:"flags"` + // Protocol. + Protocol float64 `json:"protocol"` + // Public Key. + PublicKey string `json:"public_key"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordDataJSON struct { + Algorithm apijson.Field + Flags apijson.Field + Protocol apijson.Field + PublicKey apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTypeDnskey DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecord struct { + // Components of a DS record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted DS content. See 'data' to set DS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a DS record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm float64 `json:"algorithm"` + // Digest. + Digest string `json:"digest"` + // Digest Type. + DigestType float64 `json:"digest_type"` + // Key Tag. + KeyTag float64 `json:"key_tag"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordDataJSON struct { + Algorithm apijson.Field + Digest apijson.Field + DigestType apijson.Field + KeyTag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTypeDs DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordType = "DS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted HTTPS content. See 'data' to set HTTPS properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a HTTPS record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTypeHTTPs DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecord struct { + // Components of a LOC record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted LOC content. See 'data' to set LOC properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a LOC record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude float64 `json:"altitude"` + // Degrees of latitude. + LatDegrees float64 `json:"lat_degrees"` + // Latitude direction. + LatDirection DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirection `json:"lat_direction"` + // Minutes of latitude. + LatMinutes float64 `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds float64 `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees float64 `json:"long_degrees"` + // Longitude direction. + LongDirection DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirection `json:"long_direction"` + // Minutes of longitude. + LongMinutes float64 `json:"long_minutes"` + // Seconds of longitude. + LongSeconds float64 `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz float64 `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert float64 `json:"precision_vert"` + // Size of location in meters. + Size float64 `json:"size"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataJSON struct { + Altitude apijson.Field + LatDegrees apijson.Field + LatDirection apijson.Field + LatMinutes apijson.Field + LatSeconds apijson.Field + LongDegrees apijson.Field + LongDirection apijson.Field + LongMinutes apijson.Field + LongSeconds apijson.Field + PrecisionHorz apijson.Field + PrecisionVert apijson.Field + Size apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Latitude direction. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirectionN DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirectionS DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirectionE DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirectionW DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTypeLoc DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordType = "LOC" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content string `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordJSON struct { + Content apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTypeMx DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordType = "MX" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted NAPTR content. See 'data' to set NAPTR properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a NAPTR record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordData struct { + // Flags. + Flags string `json:"flags"` + // Order. + Order float64 `json:"order"` + // Preference. + Preference float64 `json:"preference"` + // Regex. + Regex string `json:"regex"` + // Replacement. + Replacement string `json:"replacement"` + // Service. + Service string `json:"service"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordDataJSON struct { + Flags apijson.Field + Order apijson.Field + Preference apijson.Field + Regex apijson.Field + Replacement apijson.Field + Service apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTypeNaptr DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordType = "NAPTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecord struct { + // A valid name server host name. + Content interface{} `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTypeNs DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordType = "NS" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTypePtr DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordType = "PTR" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SMIMEA content. See 'data' to set SMIMEA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a SMIMEA record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTypeSmimea DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Priority, weight, port, and SRV target. See 'data' for setting the individual + // component values. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a SRV record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name string `json:"name" format:"hostname"` + // The port of the service. + Port float64 `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto string `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service string `json:"service"` + // A valid hostname. + Target string `json:"target" format:"hostname"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordDataJSON struct { + Name apijson.Field + Port apijson.Field + Priority apijson.Field + Proto apijson.Field + Service apijson.Field + Target apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTypeSrv DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordType = "SRV" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SSHFP content. See 'data' to set SSHFP properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a SSHFP record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm float64 `json:"algorithm"` + // fingerprint. + Fingerprint string `json:"fingerprint"` + // type. + Type float64 `json:"type"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordDataJSON struct { + Algorithm apijson.Field + Fingerprint apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTypeSshfp DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordType = "SSHFP" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted SVCB content. See 'data' to set SVCB properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a SVCB record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordData struct { + // priority. + Priority float64 `json:"priority"` + // target. + Target string `json:"target"` + // value. + Value string `json:"value"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordDataJSON struct { + Priority apijson.Field + Target apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTypeSvcb DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordType = "SVCB" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted TLSA content. See 'data' to set TLSA properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordJSON struct { + Data apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a TLSA record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordData struct { + // certificate. + Certificate string `json:"certificate"` + // Matching Type. + MatchingType float64 `json:"matching_type"` + // Selector. + Selector float64 `json:"selector"` + // Usage. + Usage float64 `json:"usage"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordDataJSON struct { + Certificate apijson.Field + MatchingType apijson.Field + Selector apijson.Field + Usage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTypeTlsa DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordType = "TLSA" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecord struct { + // Text content for the record. + Content string `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordJSON struct { + Content apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTypeTxt DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordType = "TXT" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecord struct { + // Components of a URI record. + Data DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordData `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name string `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority,required"` + // Record type. + Type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordType `json:"type,required"` + // Identifier + ID string `json:"id"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment string `json:"comment"` + // Formatted URI content. See 'data' to set URI properties. + Content string `json:"content"` + // When the record was created. + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Whether this record can be modified/deleted (true means it's managed by + // Cloudflare). + Locked bool `json:"locked"` + // Extra Cloudflare-specific information about the record. + Meta DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMeta `json:"meta"` + // When the record was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // Whether the record can be proxied by Cloudflare or not. + Proxiable bool `json:"proxiable"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags []string `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTL `json:"ttl"` + // Identifier + ZoneID string `json:"zone_id"` + // The domain of the record. + ZoneName string `json:"zone_name" format:"hostname"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecord] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordJSON struct { + Data apijson.Field + Name apijson.Field + Priority apijson.Field + Type apijson.Field + ID apijson.Field + Comment apijson.Field + Content apijson.Field + CreatedOn apijson.Field + Locked apijson.Field + Meta apijson.Field + ModifiedOn apijson.Field + Proxiable apijson.Field + Tags apijson.Field + TTL apijson.Field + ZoneID apijson.Field + ZoneName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecord) implementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResult() { +} + +// Components of a URI record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordData struct { + // The record content. + Content string `json:"content"` + // The record weight. + Weight float64 `json:"weight"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordDataJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordDataJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordData] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordDataJSON struct { + Content apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordData) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTypeUri DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordType = "URI" +) + +// Extra Cloudflare-specific information about the record. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMeta struct { + // Will exist if Cloudflare automatically added this DNS record during initial + // setup. + AutoAdded bool `json:"auto_added"` + // Where the record originated from. + Source string `json:"source"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMetaJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMetaJSON +// contains the JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMeta] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMetaJSON struct { + AutoAdded apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Union satisfied by [shared.UnionFloat] or +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTLNumber1 DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfoJSON `json:"-"` +} + +// dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfoJSON contains the +// JSON metadata for the struct +// [DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfo] +type dnsRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type DNSRecordDNSRecordsForAZoneListDNSRecordsResponseSuccess bool + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsResponseSuccessTrue DNSRecordDNSRecordsForAZoneListDNSRecordsResponseSuccess = true +) + +// This interface is a union satisfied by one of the following: +// [DNSRecordUpdateParamsDNSRecordsARecord], +// [DNSRecordUpdateParamsDNSRecordsAaaaRecord], +// [DNSRecordUpdateParamsDNSRecordsCaaRecord], +// [DNSRecordUpdateParamsDNSRecordsCertRecord], +// [DNSRecordUpdateParamsDNSRecordsCnameRecord], +// [DNSRecordUpdateParamsDNSRecordsDnskeyRecord], +// [DNSRecordUpdateParamsDNSRecordsDsRecord], +// [DNSRecordUpdateParamsDNSRecordsHTTPsRecord], +// [DNSRecordUpdateParamsDNSRecordsLocRecord], +// [DNSRecordUpdateParamsDNSRecordsMxRecord], +// [DNSRecordUpdateParamsDNSRecordsNaptrRecord], +// [DNSRecordUpdateParamsDNSRecordsNsRecord], +// [DNSRecordUpdateParamsDNSRecordsPtrRecord], +// [DNSRecordUpdateParamsDNSRecordsSmimeaRecord], +// [DNSRecordUpdateParamsDNSRecordsSrvRecord], +// [DNSRecordUpdateParamsDNSRecordsSshfpRecord], +// [DNSRecordUpdateParamsDNSRecordsSvcbRecord], +// [DNSRecordUpdateParamsDNSRecordsTlsaRecord], +// [DNSRecordUpdateParamsDNSRecordsTxtRecord], +// [DNSRecordUpdateParamsDNSRecordsUriRecord]. +type DNSRecordUpdateParams interface { + ImplementsDNSRecordUpdateParams() +} + +type DNSRecordUpdateParamsDNSRecordsARecord struct { + // A valid IPv4 address. + Content param.Field[string] `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsARecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsARecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsARecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsARecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsARecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsARecordTypeA DNSRecordUpdateParamsDNSRecordsARecordType = "A" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsARecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsARecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsARecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsARecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content param.Field[string] `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsAaaaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsAaaaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsAaaaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsAaaaRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsAaaaRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsAaaaRecordTypeAaaa DNSRecordUpdateParamsDNSRecordsAaaaRecordType = "AAAA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsAaaaRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsAaaaRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsCaaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsCaaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsCaaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsCaaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsCaaRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a CAA record. +type DNSRecordUpdateParamsDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags param.Field[float64] `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag param.Field[string] `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordUpdateParamsDNSRecordsCaaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsCaaRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsCaaRecordTypeCaa DNSRecordUpdateParamsDNSRecordsCaaRecordType = "CAA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsCaaRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsCaaRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsCaaRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsCertRecord struct { + // Components of a CERT record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsCertRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsCertRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsCertRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsCertRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsCertRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a CERT record. +type DNSRecordUpdateParamsDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Certificate. + Certificate param.Field[string] `json:"certificate"` + // Key Tag. + KeyTag param.Field[float64] `json:"key_tag"` + // Type. + Type param.Field[float64] `json:"type"` +} + +func (r DNSRecordUpdateParamsDNSRecordsCertRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsCertRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsCertRecordTypeCert DNSRecordUpdateParamsDNSRecordsCertRecordType = "CERT" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsCertRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsCertRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsCertRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content param.Field[interface{}] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsCnameRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsCnameRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsCnameRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsCnameRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsCnameRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsCnameRecordTypeCname DNSRecordUpdateParamsDNSRecordsCnameRecordType = "CNAME" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsCnameRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsCnameRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsCnameRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsDnskeyRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsDnskeyRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsDnskeyRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsDnskeyRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a DNSKEY record. +type DNSRecordUpdateParamsDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Flags. + Flags param.Field[float64] `json:"flags"` + // Protocol. + Protocol param.Field[float64] `json:"protocol"` + // Public Key. + PublicKey param.Field[string] `json:"public_key"` +} + +func (r DNSRecordUpdateParamsDNSRecordsDnskeyRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsDnskeyRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsDnskeyRecordTypeDnskey DNSRecordUpdateParamsDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsDnskeyRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsDsRecord struct { + // Components of a DS record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsDsRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsDsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsDsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsDsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsDsRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a DS record. +type DNSRecordUpdateParamsDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Digest. + Digest param.Field[string] `json:"digest"` + // Digest Type. + DigestType param.Field[float64] `json:"digest_type"` + // Key Tag. + KeyTag param.Field[float64] `json:"key_tag"` +} + +func (r DNSRecordUpdateParamsDNSRecordsDsRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsDsRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsDsRecordTypeDs DNSRecordUpdateParamsDNSRecordsDsRecordType = "DS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsDsRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsDsRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsDsRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsHTTPsRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsHTTPsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsHTTPsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsHTTPsRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a HTTPS record. +type DNSRecordUpdateParamsDNSRecordsHTTPsRecordData struct { + // priority. + Priority param.Field[float64] `json:"priority"` + // target. + Target param.Field[string] `json:"target"` + // value. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordUpdateParamsDNSRecordsHTTPsRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsHTTPsRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsHTTPsRecordTypeHTTPs DNSRecordUpdateParamsDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsHTTPsRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsLocRecord struct { + // Components of a LOC record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsLocRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsLocRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsLocRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsLocRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsLocRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a LOC record. +type DNSRecordUpdateParamsDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude param.Field[float64] `json:"altitude"` + // Degrees of latitude. + LatDegrees param.Field[float64] `json:"lat_degrees"` + // Latitude direction. + LatDirection param.Field[DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirection] `json:"lat_direction"` + // Minutes of latitude. + LatMinutes param.Field[float64] `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds param.Field[float64] `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees param.Field[float64] `json:"long_degrees"` + // Longitude direction. + LongDirection param.Field[DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirection] `json:"long_direction"` + // Minutes of longitude. + LongMinutes param.Field[float64] `json:"long_minutes"` + // Seconds of longitude. + LongSeconds param.Field[float64] `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz param.Field[float64] `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert param.Field[float64] `json:"precision_vert"` + // Size of location in meters. + Size param.Field[float64] `json:"size"` +} + +func (r DNSRecordUpdateParamsDNSRecordsLocRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Latitude direction. +type DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirectionN DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirectionS DNSRecordUpdateParamsDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirectionE DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirectionW DNSRecordUpdateParamsDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordUpdateParamsDNSRecordsLocRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsLocRecordTypeLoc DNSRecordUpdateParamsDNSRecordsLocRecordType = "LOC" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsLocRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsLocRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsLocRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content param.Field[string] `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsMxRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsMxRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsMxRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsMxRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsMxRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsMxRecordTypeMx DNSRecordUpdateParamsDNSRecordsMxRecordType = "MX" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsMxRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsMxRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsMxRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsNaptrRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsNaptrRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsNaptrRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsNaptrRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsNaptrRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a NAPTR record. +type DNSRecordUpdateParamsDNSRecordsNaptrRecordData struct { + // Flags. + Flags param.Field[string] `json:"flags"` + // Order. + Order param.Field[float64] `json:"order"` + // Preference. + Preference param.Field[float64] `json:"preference"` + // Regex. + Regex param.Field[string] `json:"regex"` + // Replacement. + Replacement param.Field[string] `json:"replacement"` + // Service. + Service param.Field[string] `json:"service"` +} + +func (r DNSRecordUpdateParamsDNSRecordsNaptrRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsNaptrRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsNaptrRecordTypeNaptr DNSRecordUpdateParamsDNSRecordsNaptrRecordType = "NAPTR" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsNaptrRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsNaptrRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsNsRecord struct { + // A valid name server host name. + Content param.Field[interface{}] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsNsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsNsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsNsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsNsRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsNsRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsNsRecordTypeNs DNSRecordUpdateParamsDNSRecordsNsRecordType = "NS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsNsRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsNsRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsNsRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content param.Field[string] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsPtrRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsPtrRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsPtrRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsPtrRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsPtrRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsPtrRecordTypePtr DNSRecordUpdateParamsDNSRecordsPtrRecordType = "PTR" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsPtrRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsPtrRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsPtrRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsSmimeaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsSmimeaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSmimeaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsSmimeaRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a SMIMEA record. +type DNSRecordUpdateParamsDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate param.Field[string] `json:"certificate"` + // Matching Type. + MatchingType param.Field[float64] `json:"matching_type"` + // Selector. + Selector param.Field[float64] `json:"selector"` + // Usage. + Usage param.Field[float64] `json:"usage"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSmimeaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsSmimeaRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsSmimeaRecordTypeSmimea DNSRecordUpdateParamsDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsSmimeaRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsSrvRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsSrvRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsSrvRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSrvRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsSrvRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a SRV record. +type DNSRecordUpdateParamsDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name param.Field[string] `json:"name" format:"hostname"` + // The port of the service. + Port param.Field[float64] `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto param.Field[string] `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service param.Field[string] `json:"service"` + // A valid hostname. + Target param.Field[string] `json:"target" format:"hostname"` + // The record weight. + Weight param.Field[float64] `json:"weight"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSrvRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsSrvRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsSrvRecordTypeSrv DNSRecordUpdateParamsDNSRecordsSrvRecordType = "SRV" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsSrvRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsSrvRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsSrvRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsSshfpRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsSshfpRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsSshfpRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSshfpRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsSshfpRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a SSHFP record. +type DNSRecordUpdateParamsDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // fingerprint. + Fingerprint param.Field[string] `json:"fingerprint"` + // type. + Type param.Field[float64] `json:"type"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSshfpRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsSshfpRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsSshfpRecordTypeSshfp DNSRecordUpdateParamsDNSRecordsSshfpRecordType = "SSHFP" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsSshfpRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsSshfpRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsSvcbRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsSvcbRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsSvcbRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSvcbRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsSvcbRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a SVCB record. +type DNSRecordUpdateParamsDNSRecordsSvcbRecordData struct { + // priority. + Priority param.Field[float64] `json:"priority"` + // target. + Target param.Field[string] `json:"target"` + // value. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordUpdateParamsDNSRecordsSvcbRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsSvcbRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsSvcbRecordTypeSvcb DNSRecordUpdateParamsDNSRecordsSvcbRecordType = "SVCB" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsSvcbRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsSvcbRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsTlsaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsTlsaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsTlsaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsTlsaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsTlsaRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a TLSA record. +type DNSRecordUpdateParamsDNSRecordsTlsaRecordData struct { + // certificate. + Certificate param.Field[string] `json:"certificate"` + // Matching Type. + MatchingType param.Field[float64] `json:"matching_type"` + // Selector. + Selector param.Field[float64] `json:"selector"` + // Usage. + Usage param.Field[float64] `json:"usage"` +} + +func (r DNSRecordUpdateParamsDNSRecordsTlsaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsTlsaRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsTlsaRecordTypeTlsa DNSRecordUpdateParamsDNSRecordsTlsaRecordType = "TLSA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsTlsaRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsTlsaRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsTxtRecord struct { + // Text content for the record. + Content param.Field[string] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsTxtRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsTxtRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsTxtRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsTxtRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsTxtRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsTxtRecordTypeTxt DNSRecordUpdateParamsDNSRecordsTxtRecordType = "TXT" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsTxtRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsTxtRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsTxtRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordUpdateParamsDNSRecordsUriRecord struct { + // Components of a URI record. + Data param.Field[DNSRecordUpdateParamsDNSRecordsUriRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority,required"` + // Record type. + Type param.Field[DNSRecordUpdateParamsDNSRecordsUriRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordUpdateParamsDNSRecordsUriRecordTTL] `json:"ttl"` +} + +func (r DNSRecordUpdateParamsDNSRecordsUriRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordUpdateParamsDNSRecordsUriRecord) ImplementsDNSRecordUpdateParams() { + +} + +// Components of a URI record. +type DNSRecordUpdateParamsDNSRecordsUriRecordData struct { + // The record content. + Content param.Field[string] `json:"content"` + // The record weight. + Weight param.Field[float64] `json:"weight"` +} + +func (r DNSRecordUpdateParamsDNSRecordsUriRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordUpdateParamsDNSRecordsUriRecordType string + +const ( + DNSRecordUpdateParamsDNSRecordsUriRecordTypeUri DNSRecordUpdateParamsDNSRecordsUriRecordType = "URI" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordUpdateParamsDNSRecordsUriRecordTTLNumber]. +type DNSRecordUpdateParamsDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordUpdateParamsDNSRecordsUriRecordTTL() +} + +type DNSRecordUpdateParamsDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordUpdateParamsDNSRecordsUriRecordTTLNumber1 DNSRecordUpdateParamsDNSRecordsUriRecordTTLNumber = 1 +) + +type DNSRecordDeleteResponseEnvelope struct { + Result DNSRecordDeleteResponse `json:"result"` + JSON dnsRecordDeleteResponseEnvelopeJSON `json:"-"` +} + +// dnsRecordDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [DNSRecordDeleteResponseEnvelope] +type dnsRecordDeleteResponseEnvelopeJSON struct { + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// This interface is a union satisfied by one of the following: +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecord], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecord]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParams interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecord struct { + // A valid IPv4 address. + Content param.Field[string] `json:"content,required" format:"ipv4"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTypeA DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordType = "A" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecord struct { + // A valid IPv6 address. + Content param.Field[string] `json:"content,required" format:"ipv6"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTypeAaaa DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordType = "AAAA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecord struct { + // Components of a CAA record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a CAA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordData struct { + // Flags for the CAA record. + Flags param.Field[float64] `json:"flags"` + // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). + Tag param.Field[string] `json:"tag"` + // Value of the record. This field's semantics depend on the chosen tag. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTypeCaa DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordType = "CAA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecord struct { + // Components of a CERT record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a CERT record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Certificate. + Certificate param.Field[string] `json:"certificate"` + // Key Tag. + KeyTag param.Field[float64] `json:"key_tag"` + // Type. + Type param.Field[float64] `json:"type"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTypeCert DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordType = "CERT" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecord struct { + // A valid hostname. Must not match the record's name. + Content param.Field[interface{}] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `json:"proxied"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTypeCname DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordType = "CNAME" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecord struct { + // Components of a DNSKEY record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a DNSKEY record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Flags. + Flags param.Field[float64] `json:"flags"` + // Protocol. + Protocol param.Field[float64] `json:"protocol"` + // Public Key. + PublicKey param.Field[string] `json:"public_key"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTypeDnskey DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordType = "DNSKEY" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecord struct { + // Components of a DS record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a DS record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordData struct { + // Algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // Digest. + Digest param.Field[string] `json:"digest"` + // Digest Type. + DigestType param.Field[float64] `json:"digest_type"` + // Key Tag. + KeyTag param.Field[float64] `json:"key_tag"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTypeDs DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordType = "DS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecord struct { + // Components of a HTTPS record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a HTTPS record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordData struct { + // priority. + Priority param.Field[float64] `json:"priority"` + // target. + Target param.Field[string] `json:"target"` + // value. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTypeHTTPs DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordType = "HTTPS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecord struct { + // Components of a LOC record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a LOC record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordData struct { + // Altitude of location in meters. + Altitude param.Field[float64] `json:"altitude"` + // Degrees of latitude. + LatDegrees param.Field[float64] `json:"lat_degrees"` + // Latitude direction. + LatDirection param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirection] `json:"lat_direction"` + // Minutes of latitude. + LatMinutes param.Field[float64] `json:"lat_minutes"` + // Seconds of latitude. + LatSeconds param.Field[float64] `json:"lat_seconds"` + // Degrees of longitude. + LongDegrees param.Field[float64] `json:"long_degrees"` + // Longitude direction. + LongDirection param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirection] `json:"long_direction"` + // Minutes of longitude. + LongMinutes param.Field[float64] `json:"long_minutes"` + // Seconds of longitude. + LongSeconds param.Field[float64] `json:"long_seconds"` + // Horizontal precision of location. + PrecisionHorz param.Field[float64] `json:"precision_horz"` + // Vertical precision of location. + PrecisionVert param.Field[float64] `json:"precision_vert"` + // Size of location in meters. + Size param.Field[float64] `json:"size"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Latitude direction. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirection string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirectionN DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirection = "N" + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirectionS DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLatDirection = "S" +) + +// Longitude direction. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirection string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirectionE DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirection = "E" + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirectionW DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordDataLongDirection = "W" +) + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTypeLoc DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordType = "LOC" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecord struct { + // A valid mail server hostname. + Content param.Field[string] `json:"content,required" format:"hostname"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTypeMx DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordType = "MX" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecord struct { + // Components of a NAPTR record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a NAPTR record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordData struct { + // Flags. + Flags param.Field[string] `json:"flags"` + // Order. + Order param.Field[float64] `json:"order"` + // Preference. + Preference param.Field[float64] `json:"preference"` + // Regex. + Regex param.Field[string] `json:"regex"` + // Replacement. + Replacement param.Field[string] `json:"replacement"` + // Service. + Service param.Field[string] `json:"service"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTypeNaptr DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordType = "NAPTR" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecord struct { + // A valid name server host name. + Content param.Field[interface{}] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTypeNs DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordType = "NS" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecord struct { + // Domain name pointing to the address. + Content param.Field[string] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTypePtr DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordType = "PTR" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecord struct { + // Components of a SMIMEA record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a SMIMEA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordData struct { + // Certificate. + Certificate param.Field[string] `json:"certificate"` + // Matching Type. + MatchingType param.Field[float64] `json:"matching_type"` + // Selector. + Selector param.Field[float64] `json:"selector"` + // Usage. + Usage param.Field[float64] `json:"usage"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTypeSmimea DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordType = "SMIMEA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecord struct { + // Components of a SRV record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first + // label is normally a service and the second a protocol name, each starting with + // an underscore. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a SRV record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordData struct { + // A valid hostname. Deprecated in favor of the regular 'name' outside the data + // map. This data map field represents the remainder of the full 'name' after the + // service and protocol. + Name param.Field[string] `json:"name" format:"hostname"` + // The port of the service. + Port param.Field[float64] `json:"port"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority"` + // A valid protocol, prefixed with an underscore. Deprecated in favor of the + // regular 'name' outside the data map. This data map field normally represents the + // second label of that 'name'. + Proto param.Field[string] `json:"proto"` + // A service type, prefixed with an underscore. Deprecated in favor of the regular + // 'name' outside the data map. This data map field normally represents the first + // label of that 'name'. + Service param.Field[string] `json:"service"` + // A valid hostname. + Target param.Field[string] `json:"target" format:"hostname"` + // The record weight. + Weight param.Field[float64] `json:"weight"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTypeSrv DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordType = "SRV" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecord struct { + // Components of a SSHFP record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a SSHFP record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordData struct { + // algorithm. + Algorithm param.Field[float64] `json:"algorithm"` + // fingerprint. + Fingerprint param.Field[string] `json:"fingerprint"` + // type. + Type param.Field[float64] `json:"type"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTypeSshfp DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordType = "SSHFP" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecord struct { + // Components of a SVCB record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a SVCB record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordData struct { + // priority. + Priority param.Field[float64] `json:"priority"` + // target. + Target param.Field[string] `json:"target"` + // value. + Value param.Field[string] `json:"value"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTypeSvcb DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordType = "SVCB" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecord struct { + // Components of a TLSA record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a TLSA record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordData struct { + // certificate. + Certificate param.Field[string] `json:"certificate"` + // Matching Type. + MatchingType param.Field[float64] `json:"matching_type"` + // Selector. + Selector param.Field[float64] `json:"selector"` + // Usage. + Usage param.Field[float64] `json:"usage"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTypeTlsa DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordType = "TLSA" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecord struct { + // Text content for the record. + Content param.Field[string] `json:"content,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTypeTxt DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordType = "TXT" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecord struct { + // Components of a URI record. + Data param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordData] `json:"data,required"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `json:"name,required"` + // Required for MX, SRV and URI records; unused by other record types. Records with + // lower priorities are preferred. + Priority param.Field[float64] `json:"priority,required"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordType] `json:"type,required"` + // Comments or notes about the DNS record. This field has no effect on DNS + // responses. + Comment param.Field[string] `json:"comment"` + // Custom tags for the DNS record. This field has no effect on DNS responses. + Tags param.Field[[]string] `json:"tags"` + // Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. + // Value must be between 60 and 86400, with the minimum reduced to 30 for + // Enterprise zones. + TTL param.Field[DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTL] `json:"ttl"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecord) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecord) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParams() { + +} + +// Components of a URI record. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordData struct { + // The record content. + Content param.Field[string] `json:"content"` + // The record weight. + Weight param.Field[float64] `json:"weight"` +} + +func (r DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordData) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Record type. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordType string + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTypeUri DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordType = "URI" +) + +// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. +// Value must be between 60 and 86400, with the minimum reduced to 30 for +// Enterprise zones. +// +// Satisfied by [shared.UnionFloat], +// [DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTLNumber]. +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTL interface { + ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTL() +} + +type DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTLNumber float64 + +const ( + DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTLNumber1 DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTLNumber = 1 +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsParams struct { + Comment param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsComment] `query:"comment"` + // DNS record content. + Content param.Field[string] `query:"content"` + // Direction to order DNS records in. + Direction param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirection] `query:"direction"` + // Whether to match all search requirements or at least one (any). If set to `all`, + // acts like a logical AND between filters. If set to `any`, acts like a logical OR + // instead. Note that the interaction between tag filters is controlled by the + // `tag-match` parameter instead. + Match param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatch] `query:"match"` + // DNS record name (or @ for the zone apex) in Punycode. + Name param.Field[string] `query:"name"` + // Field to order DNS records by. + Order param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder] `query:"order"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Number of DNS records per page. + PerPage param.Field[float64] `query:"per_page"` + // Whether the record is receiving the performance and security benefits of + // Cloudflare. + Proxied param.Field[bool] `query:"proxied"` + // Allows searching in multiple properties of a DNS record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. This + // parameter works independently of the `match` setting. For automated searches, + // please use the other available parameters. + Search param.Field[string] `query:"search"` + Tag param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTag] `query:"tag"` + // Whether to match all tag search requirements or at least one (any). If set to + // `all`, acts like a logical AND between tag filters. If set to `any`, acts like a + // logical OR instead. Note that the regular `match` parameter is still used to + // combine the resulting condition with other filters that aren't related to tags. + TagMatch param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatch] `query:"tag_match"` + // Record type. + Type param.Field[DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType] `query:"type"` +} + +// URLQuery serializes [DNSRecordDNSRecordsForAZoneListDNSRecordsParams]'s query +// parameters as `url.Values`. +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsComment struct { + // If this parameter is present, only records _without_ a comment are returned. + Absent param.Field[string] `query:"absent"` + // Substring of the DNS record comment. Comment filters are case-insensitive. + Contains param.Field[string] `query:"contains"` + // Suffix of the DNS record comment. Comment filters are case-insensitive. + Endswith param.Field[string] `query:"endswith"` + // Exact value of the DNS record comment. Comment filters are case-insensitive. + Exact param.Field[string] `query:"exact"` + // If this parameter is present, only records _with_ a comment are returned. + Present param.Field[string] `query:"present"` + // Prefix of the DNS record comment. Comment filters are case-insensitive. + Startswith param.Field[string] `query:"startswith"` +} + +// URLQuery serializes [DNSRecordDNSRecordsForAZoneListDNSRecordsParamsComment]'s +// query parameters as `url.Values`. +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsParamsComment) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Direction to order DNS records in. +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirection string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirectionAsc DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirection = "asc" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirectionDesc DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirection = "desc" +) + +// Whether to match all search requirements or at least one (any). If set to `all`, +// acts like a logical AND between filters. If set to `any`, acts like a logical OR +// instead. Note that the interaction between tag filters is controlled by the +// `tag-match` parameter instead. +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatch string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatchAny DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatch = "any" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatchAll DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatch = "all" +) + +// Field to order DNS records by. +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderType DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder = "type" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderName DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder = "name" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderContent DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder = "content" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderTTL DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder = "ttl" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderProxied DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrder = "proxied" +) + +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTag struct { + // Name of a tag which must _not_ be present on the DNS record. Tag filters are + // case-insensitive. + Absent param.Field[string] `query:"absent"` + // A tag and value, of the form `:`. The API will only return + // DNS records that have a tag named `` whose value contains + // ``. Tag filters are case-insensitive. + Contains param.Field[string] `query:"contains"` + // A tag and value, of the form `:`. The API will only return + // DNS records that have a tag named `` whose value ends with + // ``. Tag filters are case-insensitive. + Endswith param.Field[string] `query:"endswith"` + // A tag and value, of the form `:`. The API will only return + // DNS records that have a tag named `` whose value is ``. Tag + // filters are case-insensitive. + Exact param.Field[string] `query:"exact"` + // Name of a tag which must be present on the DNS record. Tag filters are + // case-insensitive. + Present param.Field[string] `query:"present"` + // A tag and value, of the form `:`. The API will only return + // DNS records that have a tag named `` whose value starts with + // ``. Tag filters are case-insensitive. + Startswith param.Field[string] `query:"startswith"` +} + +// URLQuery serializes [DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTag]'s query +// parameters as `url.Values`. +func (r DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTag) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Whether to match all tag search requirements or at least one (any). If set to +// `all`, acts like a logical AND between tag filters. If set to `any`, acts like a +// logical OR instead. Note that the regular `match` parameter is still used to +// combine the resulting condition with other filters that aren't related to tags. +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatch string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatchAny DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatch = "any" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatchAll DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatch = "all" +) + +// Record type. +type DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType string + +const ( + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeA DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "A" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeAaaa DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "AAAA" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeCaa DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "CAA" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeCert DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "CERT" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeCname DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "CNAME" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeDnskey DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "DNSKEY" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeDs DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "DS" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeHTTPs DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "HTTPS" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeLoc DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "LOC" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeMx DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "MX" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeNaptr DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "NAPTR" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeNs DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "NS" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypePtr DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "PTR" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeSmimea DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "SMIMEA" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeSrv DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "SRV" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeSshfp DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "SSHFP" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeSvcb DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "SVCB" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeTlsa DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "TLSA" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeTxt DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "TXT" + DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeUri DNSRecordDNSRecordsForAZoneListDNSRecordsParamsType = "URI" +) diff --git a/dnsrecord_test.go b/dnsrecord_test.go new file mode 100644 index 00000000000..8716d7f3745 --- /dev/null +++ b/dnsrecord_test.go @@ -0,0 +1,210 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestDNSRecordGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestDNSRecordUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.Update( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.DNSRecordUpdateParamsDNSRecordsARecord{ + Content: cloudflare.F("198.51.100.4"), + Name: cloudflare.F("example.com"), + Type: cloudflare.F(cloudflare.DNSRecordUpdateParamsDNSRecordsARecordTypeA), + Comment: cloudflare.F("Domain verification record"), + Proxied: cloudflare.F(false), + Tags: cloudflare.F([]string{"owner:dns-team", "owner:dns-team", "owner:dns-team"}), + TTL: cloudflare.F[cloudflare.DNSRecordUpdateParamsDNSRecordsARecordTTL](shared.UnionFloat(3600.000000)), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestDNSRecordDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.Delete( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "023e105f4ecef8ad9ca31a8372d0c353", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestDNSRecordDNSRecordsForAZoneNewDNSRecordWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.DNSRecordsForAZoneNewDNSRecord( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecord{ + Content: cloudflare.F("198.51.100.4"), + Name: cloudflare.F("example.com"), + Type: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTypeA), + Comment: cloudflare.F("Domain verification record"), + Proxied: cloudflare.F(false), + Tags: cloudflare.F([]string{"owner:dns-team", "owner:dns-team", "owner:dns-team"}), + TTL: cloudflare.F[cloudflare.DNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTL](shared.UnionFloat(3600.000000)), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestDNSRecordDNSRecordsForAZoneListDNSRecordsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.DNSRecordsForAZoneListDNSRecords( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParams{ + Comment: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsComment{ + Present: cloudflare.F("string"), + Absent: cloudflare.F("string"), + Exact: cloudflare.F("Hello, world"), + Contains: cloudflare.F("ello, worl"), + Startswith: cloudflare.F("Hello, w"), + Endswith: cloudflare.F("o, world"), + }), + Content: cloudflare.F("127.0.0.1"), + Direction: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsDirectionAsc), + Match: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsMatchAny), + Name: cloudflare.F("example.com"), + Order: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsOrderType), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(5.000000), + Proxied: cloudflare.F(false), + Search: cloudflare.F("www.cloudflare.com"), + Tag: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTag{ + Present: cloudflare.F("important"), + Absent: cloudflare.F("important"), + Exact: cloudflare.F("greeting:Hello, world"), + Contains: cloudflare.F("greeting:ello, worl"), + Startswith: cloudflare.F("greeting:Hello, w"), + Endswith: cloudflare.F("greeting:o, world"), + }), + TagMatch: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTagMatchAny), + Type: cloudflare.F(cloudflare.DNSRecordDNSRecordsForAZoneListDNSRecordsParamsTypeA), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/dnsrecordexport.go b/dnsrecordexport.go new file mode 100644 index 00000000000..124b85c262a --- /dev/null +++ b/dnsrecordexport.go @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// DNSRecordExportService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewDNSRecordExportService] method +// instead. +type DNSRecordExportService struct { + Options []option.RequestOption +} + +// NewDNSRecordExportService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewDNSRecordExportService(opts ...option.RequestOption) (r *DNSRecordExportService) { + r = &DNSRecordExportService{} + r.Options = opts + return +} + +// You can export your +// [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this +// endpoint. +// +// See +// [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") +// for more information. +func (r *DNSRecordExportService) List(ctx context.Context, zoneID string, opts ...option.RequestOption) (res *string, err error) { + opts = append(r.Options[:], opts...) + opts = append([]option.RequestOption{option.WithHeader("Accept", "text/plain")}, opts...) + path := fmt.Sprintf("zones/%s/dns_records/export", zoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} diff --git a/zonesettingadvancedddos_test.go b/dnsrecordexport_test.go similarity index 73% rename from zonesettingadvancedddos_test.go rename to dnsrecordexport_test.go index 100f4662f69..b5e6c707d0b 100644 --- a/zonesettingadvancedddos_test.go +++ b/dnsrecordexport_test.go @@ -13,7 +13,8 @@ import ( "github.com/cloudflare/cloudflare-sdk-go/option" ) -func TestZoneSettingAdvancedDDOSList(t *testing.T) { +func TestDNSRecordExportList(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,10 +25,11 @@ func TestZoneSettingAdvancedDDOSList(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.Settings.AdvancedDDOS.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + _, err := client.DNSRecords.Exports.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/dnsrecordimport.go b/dnsrecordimport.go new file mode 100644 index 00000000000..451a991fe45 --- /dev/null +++ b/dnsrecordimport.go @@ -0,0 +1,186 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// DNSRecordImportService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewDNSRecordImportService] method +// instead. +type DNSRecordImportService struct { + Options []option.RequestOption +} + +// NewDNSRecordImportService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewDNSRecordImportService(opts ...option.RequestOption) (r *DNSRecordImportService) { + r = &DNSRecordImportService{} + r.Options = opts + return +} + +// You can upload your +// [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this +// endpoint. It assumes that cURL is called from a location with bind_config.txt +// (valid BIND config) present. +// +// See +// [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") +// for more information. +func (r *DNSRecordImportService) DNSRecordsForAZoneImportDNSRecords(ctx context.Context, zoneID string, body DNSRecordImportDNSRecordsForAZoneImportDNSRecordsParams, opts ...option.RequestOption) (res *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records/import", zoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse struct { + Errors []DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseError `json:"errors"` + Messages []DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessage `json:"messages"` + Result DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResult `json:"result"` + // Whether the API call was successful + Success DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseSuccess `json:"success"` + Timing DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTiming `json:"timing"` + JSON dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseJSON `json:"-"` +} + +// dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseJSON contains the JSON +// metadata for the struct +// [DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse] +type dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + Timing apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseErrorJSON `json:"-"` +} + +// dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseErrorJSON contains the +// JSON metadata for the struct +// [DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseError] +type dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessageJSON `json:"-"` +} + +// dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessageJSON contains +// the JSON metadata for the struct +// [DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessage] +type dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResult struct { + // Number of DNS records added. + RecsAdded float64 `json:"recs_added"` + // Total number of DNS records parsed. + TotalRecordsParsed float64 `json:"total_records_parsed"` + JSON dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResultJSON `json:"-"` +} + +// dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResultJSON contains the +// JSON metadata for the struct +// [DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResult] +type dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResultJSON struct { + RecsAdded apijson.Field + TotalRecordsParsed apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseSuccess bool + +const ( + DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseSuccessTrue DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseSuccess = true +) + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTiming struct { + // When the file parsing ended. + EndTime time.Time `json:"end_time" format:"date-time"` + // Processing time of the file in seconds. + ProcessTime float64 `json:"process_time"` + // When the file parsing started. + StartTime time.Time `json:"start_time" format:"date-time"` + JSON dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTimingJSON `json:"-"` +} + +// dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTimingJSON contains the +// JSON metadata for the struct +// [DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTiming] +type dnsRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTimingJSON struct { + EndTime apijson.Field + ProcessTime apijson.Field + StartTime apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordImportDNSRecordsForAZoneImportDNSRecordsResponseTiming) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordImportDNSRecordsForAZoneImportDNSRecordsParams struct { + // BIND config to import. + // + // **Tip:** When using cURL, a file can be uploaded using + // `--form 'file=@bind_config.txt'`. + File param.Field[string] `json:"file,required"` + // Whether or not proxiable records should receive the performance and security + // benefits of Cloudflare. + // + // The value should be either `true` or `false`. + Proxied param.Field[string] `json:"proxied"` +} + +func (r DNSRecordImportDNSRecordsForAZoneImportDNSRecordsParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} diff --git a/dnsrecordimport_test.go b/dnsrecordimport_test.go new file mode 100644 index 00000000000..5d0a4703449 --- /dev/null +++ b/dnsrecordimport_test.go @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestDNSRecordImportDNSRecordsForAZoneImportDNSRecordsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.Imports.DNSRecordsForAZoneImportDNSRecords( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.DNSRecordImportDNSRecordsForAZoneImportDNSRecordsParams{ + File: cloudflare.F("www.example.com. 300 IN A 127.0.0.1"), + Proxied: cloudflare.F("true"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/dnsrecordscan.go b/dnsrecordscan.go new file mode 100644 index 00000000000..527e8f4acea --- /dev/null +++ b/dnsrecordscan.go @@ -0,0 +1,161 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// DNSRecordScanService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewDNSRecordScanService] method +// instead. +type DNSRecordScanService struct { + Options []option.RequestOption +} + +// NewDNSRecordScanService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewDNSRecordScanService(opts ...option.RequestOption) (r *DNSRecordScanService) { + r = &DNSRecordScanService{} + r.Options = opts + return +} + +// Scan for common DNS records on your domain and automatically add them to your +// zone. Useful if you haven't updated your nameservers yet. +func (r *DNSRecordScanService) DNSRecordsForAZoneScanDNSRecords(ctx context.Context, zoneID string, opts ...option.RequestOption) (res *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/dns_records/scan", zoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse struct { + Errors []DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseError `json:"errors"` + Messages []DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessage `json:"messages"` + Result DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResult `json:"result"` + // Whether the API call was successful + Success DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseSuccess `json:"success"` + Timing DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTiming `json:"timing"` + JSON dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseJSON `json:"-"` +} + +// dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseJSON contains the JSON +// metadata for the struct [DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse] +type dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + Timing apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseErrorJSON `json:"-"` +} + +// dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseErrorJSON contains the JSON +// metadata for the struct +// [DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseError] +type dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessageJSON `json:"-"` +} + +// dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessageJSON contains the +// JSON metadata for the struct +// [DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessage] +type dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResult struct { + // Number of DNS records added. + RecsAdded float64 `json:"recs_added"` + // Total number of DNS records parsed. + TotalRecordsParsed float64 `json:"total_records_parsed"` + JSON dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResultJSON `json:"-"` +} + +// dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResultJSON contains the +// JSON metadata for the struct +// [DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResult] +type dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResultJSON struct { + RecsAdded apijson.Field + TotalRecordsParsed apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseSuccess bool + +const ( + DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseSuccessTrue DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseSuccess = true +) + +type DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTiming struct { + // When the file parsing ended. + EndTime time.Time `json:"end_time" format:"date-time"` + // Processing time of the file in seconds. + ProcessTime float64 `json:"process_time"` + // When the file parsing started. + StartTime time.Time `json:"start_time" format:"date-time"` + JSON dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTimingJSON `json:"-"` +} + +// dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTimingJSON contains the +// JSON metadata for the struct +// [DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTiming] +type dnsRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTimingJSON struct { + EndTime apijson.Field + ProcessTime apijson.Field + StartTime apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DNSRecordScanDNSRecordsForAZoneScanDNSRecordsResponseTiming) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} diff --git a/dnsrecordscan_test.go b/dnsrecordscan_test.go new file mode 100644 index 00000000000..ecf76ba4a47 --- /dev/null +++ b/dnsrecordscan_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestDNSRecordScanDNSRecordsForAZoneScanDNSRecords(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.DNSRecords.Scans.DNSRecordsForAZoneScanDNSRecords(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email.go b/email.go new file mode 100644 index 00000000000..8c295651c3c --- /dev/null +++ b/email.go @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailService contains methods and other services that help with interacting with +// the cloudflare API. Note, unlike clients, this service does not read variables +// from the environment automatically. You should not instantiate this service +// directly, and instead use the [NewEmailService] method instead. +type EmailService struct { + Options []option.RequestOption + Routings *EmailRoutingService +} + +// NewEmailService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewEmailService(opts ...option.RequestOption) (r *EmailService) { + r = &EmailService{} + r.Options = opts + r.Routings = NewEmailRoutingService(opts...) + return +} diff --git a/emailrouting.go b/emailrouting.go new file mode 100644 index 00000000000..7c56f85c180 --- /dev/null +++ b/emailrouting.go @@ -0,0 +1,190 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingService] method +// instead. +type EmailRoutingService struct { + Options []option.RequestOption + Disables *EmailRoutingDisableService + DNS *EmailRoutingDNSService + Enables *EmailRoutingEnableService + Rules *EmailRoutingRuleService + Addresses *EmailRoutingAddressService +} + +// NewEmailRoutingService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewEmailRoutingService(opts ...option.RequestOption) (r *EmailRoutingService) { + r = &EmailRoutingService{} + r.Options = opts + r.Disables = NewEmailRoutingDisableService(opts...) + r.DNS = NewEmailRoutingDNSService(opts...) + r.Enables = NewEmailRoutingEnableService(opts...) + r.Rules = NewEmailRoutingRuleService(opts...) + r.Addresses = NewEmailRoutingAddressService(opts...) + return +} + +// Get information about the settings for your Email Routing zone. +func (r *EmailRoutingService) EmailRoutingSettingsGetEmailRoutingSettings(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse struct { + Errors []EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseError `json:"errors"` + Messages []EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessage `json:"messages"` + Result EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseSuccess `json:"success"` + JSON emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseJSON `json:"-"` +} + +// emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseJSON contains the +// JSON metadata for the struct +// [EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse] +type emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseErrorJSON `json:"-"` +} + +// emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseError] +type emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessageJSON `json:"-"` +} + +// emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessage] +type emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResult struct { + // Email Routing settings identifier. + ID string `json:"id"` + // The date and time the settings have been created. + Created time.Time `json:"created" format:"date-time"` + // State of the zone settings for Email Routing. + Enabled EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabled `json:"enabled"` + // The date and time the settings have been modified. + Modified time.Time `json:"modified" format:"date-time"` + // Domain of your zone. + Name string `json:"name"` + // Flag to check if the user skipped the configuration wizard. + SkipWizard EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizard `json:"skip_wizard"` + // Show the state of your account, and the type or configuration error. + Status EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus `json:"status"` + // Email Routing settings tag. (Deprecated, replaced by Email Routing settings + // identifier) + Tag string `json:"tag"` + JSON emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultJSON `json:"-"` +} + +// emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResult] +type emailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Enabled apijson.Field + Modified apijson.Field + Name apijson.Field + SkipWizard apijson.Field + Status apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// State of the zone settings for Email Routing. +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabled bool + +const ( + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabledTrue EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabled = true + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabledFalse EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultEnabled = false +) + +// Flag to check if the user skipped the configuration wizard. +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizard bool + +const ( + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizardTrue EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizard = true + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizardFalse EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultSkipWizard = false +) + +// Show the state of your account, and the type or configuration error. +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus string + +const ( + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatusReady EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus = "ready" + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatusUnconfigured EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus = "unconfigured" + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatusMisconfigured EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus = "misconfigured" + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatusMisconfiguredLocked EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus = "misconfigured/locked" + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatusUnlocked EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseResultStatus = "unlocked" +) + +// Whether the API call was successful +type EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseSuccess bool + +const ( + EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseSuccessTrue EmailRoutingEmailRoutingSettingsGetEmailRoutingSettingsResponseSuccess = true +) diff --git a/emailrouting_test.go b/emailrouting_test.go new file mode 100644 index 00000000000..db73eca49b3 --- /dev/null +++ b/emailrouting_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingEmailRoutingSettingsGetEmailRoutingSettings(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.EmailRoutingSettingsGetEmailRoutingSettings(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingaddress.go b/emailroutingaddress.go new file mode 100644 index 00000000000..6ad377e0cb1 --- /dev/null +++ b/emailroutingaddress.go @@ -0,0 +1,564 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingAddressService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingAddressService] +// method instead. +type EmailRoutingAddressService struct { + Options []option.RequestOption +} + +// NewEmailRoutingAddressService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewEmailRoutingAddressService(opts ...option.RequestOption) (r *EmailRoutingAddressService) { + r = &EmailRoutingAddressService{} + r.Options = opts + return +} + +// Gets information for a specific destination email already created. +func (r *EmailRoutingAddressService) Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *EmailRoutingAddressGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/email/routing/addresses/%s", accountIdentifier, destinationAddressIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Deletes a specific destination address. +func (r *EmailRoutingAddressService) Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *EmailRoutingAddressDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/email/routing/addresses/%s", accountIdentifier, destinationAddressIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Create a destination address to forward your emails to. Destination addresses +// need to be verified before they can be used. +func (r *EmailRoutingAddressService) EmailRoutingDestinationAddressesNewADestinationAddress(ctx context.Context, accountIdentifier string, body EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressParams, opts ...option.RequestOption) (res *EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/email/routing/addresses", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists existing destination addresses. +func (r *EmailRoutingAddressService) EmailRoutingDestinationAddressesListDestinationAddresses(ctx context.Context, accountIdentifier string, query EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams, opts ...option.RequestOption) (res *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/email/routing/addresses", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type EmailRoutingAddressGetResponse struct { + Errors []EmailRoutingAddressGetResponseError `json:"errors"` + Messages []EmailRoutingAddressGetResponseMessage `json:"messages"` + Result EmailRoutingAddressGetResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingAddressGetResponseSuccess `json:"success"` + JSON emailRoutingAddressGetResponseJSON `json:"-"` +} + +// emailRoutingAddressGetResponseJSON contains the JSON metadata for the struct +// [EmailRoutingAddressGetResponse] +type emailRoutingAddressGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressGetResponseErrorJSON `json:"-"` +} + +// emailRoutingAddressGetResponseErrorJSON contains the JSON metadata for the +// struct [EmailRoutingAddressGetResponseError] +type emailRoutingAddressGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressGetResponseMessageJSON `json:"-"` +} + +// emailRoutingAddressGetResponseMessageJSON contains the JSON metadata for the +// struct [EmailRoutingAddressGetResponseMessage] +type emailRoutingAddressGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressGetResponseResult struct { + // Destination address identifier. + ID string `json:"id"` + // The date and time the destination address has been created. + Created time.Time `json:"created" format:"date-time"` + // The contact email address of the user. + Email string `json:"email"` + // The date and time the destination address was last modified. + Modified time.Time `json:"modified" format:"date-time"` + // Destination address tag. (Deprecated, replaced by destination address + // identifier) + Tag string `json:"tag"` + // The date and time the destination address has been verified. Null means not + // verified yet. + Verified time.Time `json:"verified" format:"date-time"` + JSON emailRoutingAddressGetResponseResultJSON `json:"-"` +} + +// emailRoutingAddressGetResponseResultJSON contains the JSON metadata for the +// struct [EmailRoutingAddressGetResponseResult] +type emailRoutingAddressGetResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Email apijson.Field + Modified apijson.Field + Tag apijson.Field + Verified apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingAddressGetResponseSuccess bool + +const ( + EmailRoutingAddressGetResponseSuccessTrue EmailRoutingAddressGetResponseSuccess = true +) + +type EmailRoutingAddressDeleteResponse struct { + Errors []EmailRoutingAddressDeleteResponseError `json:"errors"` + Messages []EmailRoutingAddressDeleteResponseMessage `json:"messages"` + Result EmailRoutingAddressDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingAddressDeleteResponseSuccess `json:"success"` + JSON emailRoutingAddressDeleteResponseJSON `json:"-"` +} + +// emailRoutingAddressDeleteResponseJSON contains the JSON metadata for the struct +// [EmailRoutingAddressDeleteResponse] +type emailRoutingAddressDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressDeleteResponseErrorJSON `json:"-"` +} + +// emailRoutingAddressDeleteResponseErrorJSON contains the JSON metadata for the +// struct [EmailRoutingAddressDeleteResponseError] +type emailRoutingAddressDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressDeleteResponseMessageJSON `json:"-"` +} + +// emailRoutingAddressDeleteResponseMessageJSON contains the JSON metadata for the +// struct [EmailRoutingAddressDeleteResponseMessage] +type emailRoutingAddressDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressDeleteResponseResult struct { + // Destination address identifier. + ID string `json:"id"` + // The date and time the destination address has been created. + Created time.Time `json:"created" format:"date-time"` + // The contact email address of the user. + Email string `json:"email"` + // The date and time the destination address was last modified. + Modified time.Time `json:"modified" format:"date-time"` + // Destination address tag. (Deprecated, replaced by destination address + // identifier) + Tag string `json:"tag"` + // The date and time the destination address has been verified. Null means not + // verified yet. + Verified time.Time `json:"verified" format:"date-time"` + JSON emailRoutingAddressDeleteResponseResultJSON `json:"-"` +} + +// emailRoutingAddressDeleteResponseResultJSON contains the JSON metadata for the +// struct [EmailRoutingAddressDeleteResponseResult] +type emailRoutingAddressDeleteResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Email apijson.Field + Modified apijson.Field + Tag apijson.Field + Verified apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingAddressDeleteResponseSuccess bool + +const ( + EmailRoutingAddressDeleteResponseSuccessTrue EmailRoutingAddressDeleteResponseSuccess = true +) + +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse struct { + Errors []EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseError `json:"errors"` + Messages []EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessage `json:"messages"` + Result EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseSuccess `json:"success"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse] +type emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseErrorJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseError] +type emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessageJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessage] +type emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResult struct { + // Destination address identifier. + ID string `json:"id"` + // The date and time the destination address has been created. + Created time.Time `json:"created" format:"date-time"` + // The contact email address of the user. + Email string `json:"email"` + // The date and time the destination address was last modified. + Modified time.Time `json:"modified" format:"date-time"` + // Destination address tag. (Deprecated, replaced by destination address + // identifier) + Tag string `json:"tag"` + // The date and time the destination address has been verified. Null means not + // verified yet. + Verified time.Time `json:"verified" format:"date-time"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResultJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResult] +type emailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Email apijson.Field + Modified apijson.Field + Tag apijson.Field + Verified apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseSuccess bool + +const ( + EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseSuccessTrue EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressResponseSuccess = true +) + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse struct { + Errors []EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseError `json:"errors"` + Messages []EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessage `json:"messages"` + Result []EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResult `json:"result"` + ResultInfo EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseSuccess `json:"success"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse] +type emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseErrorJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseError] +type emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessageJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessage] +type emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResult struct { + // Destination address identifier. + ID string `json:"id"` + // The date and time the destination address has been created. + Created time.Time `json:"created" format:"date-time"` + // The contact email address of the user. + Email string `json:"email"` + // The date and time the destination address was last modified. + Modified time.Time `json:"modified" format:"date-time"` + // Destination address tag. (Deprecated, replaced by destination address + // identifier) + Tag string `json:"tag"` + // The date and time the destination address has been verified. Null means not + // verified yet. + Verified time.Time `json:"verified" format:"date-time"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResult] +type emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Email apijson.Field + Modified apijson.Field + Tag apijson.Field + Verified apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfo struct { + Count interface{} `json:"count"` + Page interface{} `json:"page"` + PerPage interface{} `json:"per_page"` + TotalCount interface{} `json:"total_count"` + JSON emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfoJSON `json:"-"` +} + +// emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfoJSON +// contains the JSON metadata for the struct +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfo] +type emailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseSuccess bool + +const ( + EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseSuccessTrue EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesResponseSuccess = true +) + +type EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressParams struct { + // The contact email address of the user. + Email param.Field[string] `json:"email,required"` +} + +func (r EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams struct { + // Sorts results in an ascending or descending order. + Direction param.Field[EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirection] `query:"direction"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Maximum number of results per page. + PerPage param.Field[float64] `query:"per_page"` + // Filter by verified destination addresses. + Verified param.Field[EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerified] `query:"verified"` +} + +// URLQuery serializes +// [EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams]'s +// query parameters as `url.Values`. +func (r EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Sorts results in an ascending or descending order. +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirection string + +const ( + EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirectionAsc EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirection = "asc" + EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirectionDesc EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirection = "desc" +) + +// Filter by verified destination addresses. +type EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerified bool + +const ( + EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerifiedTrue EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerified = true + EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerifiedFalse EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerified = false +) diff --git a/emailroutingaddress_test.go b/emailroutingaddress_test.go new file mode 100644 index 00000000000..3d77f4864cb --- /dev/null +++ b/emailroutingaddress_test.go @@ -0,0 +1,141 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingAddressGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Addresses.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "ea95132c15732412d22c1476fa83f27a", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingAddressDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Addresses.Delete( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "ea95132c15732412d22c1476fa83f27a", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddress(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Addresses.EmailRoutingDestinationAddressesNewADestinationAddress( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesNewADestinationAddressParams{ + Email: cloudflare.F("user@example.com"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Addresses.EmailRoutingDestinationAddressesListDestinationAddresses( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParams{ + Direction: cloudflare.F(cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsDirectionAsc), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(5.000000), + Verified: cloudflare.F(cloudflare.EmailRoutingAddressEmailRoutingDestinationAddressesListDestinationAddressesParamsVerifiedTrue), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingdisable.go b/emailroutingdisable.go new file mode 100644 index 00000000000..0d3a6e96924 --- /dev/null +++ b/emailroutingdisable.go @@ -0,0 +1,181 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingDisableService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingDisableService] +// method instead. +type EmailRoutingDisableService struct { + Options []option.RequestOption +} + +// NewEmailRoutingDisableService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewEmailRoutingDisableService(opts ...option.RequestOption) (r *EmailRoutingDisableService) { + r = &EmailRoutingDisableService{} + r.Options = opts + return +} + +// Disable your Email Routing zone. Also removes additional MX records previously +// required for Email Routing to work. +func (r *EmailRoutingDisableService) EmailRoutingSettingsDisableEmailRouting(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/disable", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse struct { + Errors []EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseError `json:"errors"` + Messages []EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessage `json:"messages"` + Result EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseSuccess `json:"success"` + JSON emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseJSON `json:"-"` +} + +// emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseJSON contains +// the JSON metadata for the struct +// [EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse] +type emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseErrorJSON `json:"-"` +} + +// emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseError] +type emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessageJSON `json:"-"` +} + +// emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessage] +type emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResult struct { + // Email Routing settings identifier. + ID string `json:"id"` + // The date and time the settings have been created. + Created time.Time `json:"created" format:"date-time"` + // State of the zone settings for Email Routing. + Enabled EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabled `json:"enabled"` + // The date and time the settings have been modified. + Modified time.Time `json:"modified" format:"date-time"` + // Domain of your zone. + Name string `json:"name"` + // Flag to check if the user skipped the configuration wizard. + SkipWizard EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizard `json:"skip_wizard"` + // Show the state of your account, and the type or configuration error. + Status EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus `json:"status"` + // Email Routing settings tag. (Deprecated, replaced by Email Routing settings + // identifier) + Tag string `json:"tag"` + JSON emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultJSON `json:"-"` +} + +// emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResult] +type emailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Enabled apijson.Field + Modified apijson.Field + Name apijson.Field + SkipWizard apijson.Field + Status apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// State of the zone settings for Email Routing. +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabled bool + +const ( + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabledTrue EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabled = true + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabledFalse EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultEnabled = false +) + +// Flag to check if the user skipped the configuration wizard. +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizard bool + +const ( + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizardTrue EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizard = true + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizardFalse EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultSkipWizard = false +) + +// Show the state of your account, and the type or configuration error. +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus string + +const ( + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatusReady EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus = "ready" + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatusUnconfigured EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus = "unconfigured" + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatusMisconfigured EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus = "misconfigured" + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatusMisconfiguredLocked EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus = "misconfigured/locked" + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatusUnlocked EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseResultStatus = "unlocked" +) + +// Whether the API call was successful +type EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseSuccess bool + +const ( + EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseSuccessTrue EmailRoutingDisableEmailRoutingSettingsDisableEmailRoutingResponseSuccess = true +) diff --git a/emailroutingdisable_test.go b/emailroutingdisable_test.go new file mode 100644 index 00000000000..4f3371a2a5a --- /dev/null +++ b/emailroutingdisable_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingDisableEmailRoutingSettingsDisableEmailRouting(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Disables.EmailRoutingSettingsDisableEmailRouting(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingdns.go b/emailroutingdns.go new file mode 100644 index 00000000000..c85c2f928d8 --- /dev/null +++ b/emailroutingdns.go @@ -0,0 +1,228 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "reflect" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/internal/shared" + "github.com/cloudflare/cloudflare-sdk-go/option" + "github.com/tidwall/gjson" +) + +// EmailRoutingDNSService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingDNSService] method +// instead. +type EmailRoutingDNSService struct { + Options []option.RequestOption +} + +// NewEmailRoutingDNSService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewEmailRoutingDNSService(opts ...option.RequestOption) (r *EmailRoutingDNSService) { + r = &EmailRoutingDNSService{} + r.Options = opts + return +} + +// Show the DNS records needed to configure your Email Routing zone. +func (r *EmailRoutingDNSService) EmailRoutingSettingsEmailRoutingDNSSettings(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/dns", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse struct { + Errors []EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseError `json:"errors"` + Messages []EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessage `json:"messages"` + Result []EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResult `json:"result"` + ResultInfo EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseSuccess `json:"success"` + JSON emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseJSON `json:"-"` +} + +// emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseJSON contains +// the JSON metadata for the struct +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse] +type emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseErrorJSON `json:"-"` +} + +// emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseError] +type emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessageJSON `json:"-"` +} + +// emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessage] +type emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// List of records needed to enable an Email Routing zone. +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResult struct { + // DNS record content. + Content string `json:"content"` + // DNS record name (or @ for the zone apex). + Name string `json:"name"` + // Required for MX, SRV and URI records. Unused by other record types. Records with + // lower priorities are preferred. + Priority float64 `json:"priority"` + // Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 + // for 'automatic'. + TTL EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTL `json:"ttl"` + // DNS record type. + Type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType `json:"type"` + JSON emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultJSON `json:"-"` +} + +// emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResult] +type emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultJSON struct { + Content apijson.Field + Name apijson.Field + Priority apijson.Field + TTL apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 +// for 'automatic'. +// +// Union satisfied by [shared.UnionFloat] or +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTLNumber]. +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTL interface { + ImplementsEmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTL() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTL)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.Number, + Type: reflect.TypeOf(shared.UnionFloat(0)), + }, + ) +} + +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTLNumber float64 + +const ( + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTLNumber1 EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTLNumber = 1 +) + +// DNS record type. +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType string + +const ( + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeA EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "A" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeAaaa EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "AAAA" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeCname EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "CNAME" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeHTTPs EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "HTTPS" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeTxt EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "TXT" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeSrv EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "SRV" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeLoc EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "LOC" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeMx EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "MX" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeNs EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "NS" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeCert EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "CERT" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeDnskey EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "DNSKEY" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeDs EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "DS" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeNaptr EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "NAPTR" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeSmimea EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "SMIMEA" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeSshfp EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "SSHFP" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeSvcb EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "SVCB" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeTlsa EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "TLSA" + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTypeUri EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultType = "URI" +) + +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfoJSON `json:"-"` +} + +// emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfo] +type emailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseSuccess bool + +const ( + EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseSuccessTrue EmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseSuccess = true +) diff --git a/emailroutingdns_test.go b/emailroutingdns_test.go new file mode 100644 index 00000000000..8b5bd9f5336 --- /dev/null +++ b/emailroutingdns_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettings(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.DNS.EmailRoutingSettingsEmailRoutingDNSSettings(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingenable.go b/emailroutingenable.go new file mode 100644 index 00000000000..41f188798e1 --- /dev/null +++ b/emailroutingenable.go @@ -0,0 +1,180 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingEnableService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingEnableService] method +// instead. +type EmailRoutingEnableService struct { + Options []option.RequestOption +} + +// NewEmailRoutingEnableService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewEmailRoutingEnableService(opts ...option.RequestOption) (r *EmailRoutingEnableService) { + r = &EmailRoutingEnableService{} + r.Options = opts + return +} + +// Enable you Email Routing zone. Add and lock the necessary MX and SPF records. +func (r *EmailRoutingEnableService) EmailRoutingSettingsEnableEmailRouting(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/enable", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...) + return +} + +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse struct { + Errors []EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseError `json:"errors"` + Messages []EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessage `json:"messages"` + Result EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseSuccess `json:"success"` + JSON emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseJSON `json:"-"` +} + +// emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseJSON contains +// the JSON metadata for the struct +// [EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse] +type emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseErrorJSON `json:"-"` +} + +// emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseError] +type emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessageJSON `json:"-"` +} + +// emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessage] +type emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResult struct { + // Email Routing settings identifier. + ID string `json:"id"` + // The date and time the settings have been created. + Created time.Time `json:"created" format:"date-time"` + // State of the zone settings for Email Routing. + Enabled EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabled `json:"enabled"` + // The date and time the settings have been modified. + Modified time.Time `json:"modified" format:"date-time"` + // Domain of your zone. + Name string `json:"name"` + // Flag to check if the user skipped the configuration wizard. + SkipWizard EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizard `json:"skip_wizard"` + // Show the state of your account, and the type or configuration error. + Status EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus `json:"status"` + // Email Routing settings tag. (Deprecated, replaced by Email Routing settings + // identifier) + Tag string `json:"tag"` + JSON emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultJSON `json:"-"` +} + +// emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResult] +type emailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultJSON struct { + ID apijson.Field + Created apijson.Field + Enabled apijson.Field + Modified apijson.Field + Name apijson.Field + SkipWizard apijson.Field + Status apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// State of the zone settings for Email Routing. +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabled bool + +const ( + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabledTrue EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabled = true + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabledFalse EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultEnabled = false +) + +// Flag to check if the user skipped the configuration wizard. +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizard bool + +const ( + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizardTrue EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizard = true + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizardFalse EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultSkipWizard = false +) + +// Show the state of your account, and the type or configuration error. +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus string + +const ( + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatusReady EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus = "ready" + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatusUnconfigured EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus = "unconfigured" + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatusMisconfigured EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus = "misconfigured" + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatusMisconfiguredLocked EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus = "misconfigured/locked" + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatusUnlocked EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseResultStatus = "unlocked" +) + +// Whether the API call was successful +type EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseSuccess bool + +const ( + EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseSuccessTrue EmailRoutingEnableEmailRoutingSettingsEnableEmailRoutingResponseSuccess = true +) diff --git a/emailroutingenable_test.go b/emailroutingenable_test.go new file mode 100644 index 00000000000..a2468d87878 --- /dev/null +++ b/emailroutingenable_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingEnableEmailRoutingSettingsEnableEmailRouting(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Enables.EmailRoutingSettingsEnableEmailRouting(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingrule.go b/emailroutingrule.go new file mode 100644 index 00000000000..49367cb1772 --- /dev/null +++ b/emailroutingrule.go @@ -0,0 +1,1199 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingRuleService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewEmailRoutingRuleService] method +// instead. +type EmailRoutingRuleService struct { + Options []option.RequestOption + CatchAlls *EmailRoutingRuleCatchAllService +} + +// NewEmailRoutingRuleService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewEmailRoutingRuleService(opts ...option.RequestOption) (r *EmailRoutingRuleService) { + r = &EmailRoutingRuleService{} + r.Options = opts + r.CatchAlls = NewEmailRoutingRuleCatchAllService(opts...) + return +} + +// Get information for a specific routing rule already created. +func (r *EmailRoutingRuleService) Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *EmailRoutingRuleGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Update actions and matches, or enable/disable specific routing rules. +func (r *EmailRoutingRuleService) Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body EmailRoutingRuleUpdateParams, opts ...option.RequestOption) (res *EmailRoutingRuleUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Delete a specific routing rule. +func (r *EmailRoutingRuleService) Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *EmailRoutingRuleDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Rules consist of a set of criteria for matching emails (such as an email being +// sent to a specific custom email address) plus a set of actions to take on the +// email (like forwarding it to a specific destination address). +func (r *EmailRoutingRuleService) EmailRoutingRoutingRulesNewRoutingRule(ctx context.Context, zoneIdentifier string, body EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParams, opts ...option.RequestOption) (res *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists existing routing rules. +func (r *EmailRoutingRuleService) EmailRoutingRoutingRulesListRoutingRules(ctx context.Context, zoneIdentifier string, query EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams, opts ...option.RequestOption) (res *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type EmailRoutingRuleGetResponse struct { + Errors []EmailRoutingRuleGetResponseError `json:"errors"` + Messages []EmailRoutingRuleGetResponseMessage `json:"messages"` + Result EmailRoutingRuleGetResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleGetResponseSuccess `json:"success"` + JSON emailRoutingRuleGetResponseJSON `json:"-"` +} + +// emailRoutingRuleGetResponseJSON contains the JSON metadata for the struct +// [EmailRoutingRuleGetResponse] +type emailRoutingRuleGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleGetResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleGetResponseErrorJSON contains the JSON metadata for the struct +// [EmailRoutingRuleGetResponseError] +type emailRoutingRuleGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleGetResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleGetResponseMessageJSON contains the JSON metadata for the struct +// [EmailRoutingRuleGetResponseMessage] +type emailRoutingRuleGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleGetResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions patterns. + Actions []EmailRoutingRuleGetResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleGetResponseResultEnabled `json:"enabled"` + // Matching patterns to forward to your actions. + Matchers []EmailRoutingRuleGetResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Priority of the routing rule. + Priority float64 `json:"priority"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleGetResponseResultJSON `json:"-"` +} + +// emailRoutingRuleGetResponseResultJSON contains the JSON metadata for the struct +// [EmailRoutingRuleGetResponseResult] +type emailRoutingRuleGetResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Priority apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Actions pattern. +type EmailRoutingRuleGetResponseResultAction struct { + // Type of supported action. + Type EmailRoutingRuleGetResponseResultActionsType `json:"type,required"` + Value []string `json:"value,required"` + JSON emailRoutingRuleGetResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleGetResponseResultActionJSON contains the JSON metadata for the +// struct [EmailRoutingRuleGetResponseResultAction] +type emailRoutingRuleGetResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of supported action. +type EmailRoutingRuleGetResponseResultActionsType string + +const ( + EmailRoutingRuleGetResponseResultActionsTypeDrop EmailRoutingRuleGetResponseResultActionsType = "drop" + EmailRoutingRuleGetResponseResultActionsTypeForward EmailRoutingRuleGetResponseResultActionsType = "forward" + EmailRoutingRuleGetResponseResultActionsTypeWorker EmailRoutingRuleGetResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleGetResponseResultEnabled bool + +const ( + EmailRoutingRuleGetResponseResultEnabledTrue EmailRoutingRuleGetResponseResultEnabled = true + EmailRoutingRuleGetResponseResultEnabledFalse EmailRoutingRuleGetResponseResultEnabled = false +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleGetResponseResultMatcher struct { + // Field for type matcher. + Field EmailRoutingRuleGetResponseResultMatchersField `json:"field,required"` + // Type of matcher. + Type EmailRoutingRuleGetResponseResultMatchersType `json:"type,required"` + // Value for matcher. + Value string `json:"value,required"` + JSON emailRoutingRuleGetResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleGetResponseResultMatcherJSON contains the JSON metadata for the +// struct [EmailRoutingRuleGetResponseResultMatcher] +type emailRoutingRuleGetResponseResultMatcherJSON struct { + Field apijson.Field + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleGetResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Field for type matcher. +type EmailRoutingRuleGetResponseResultMatchersField string + +const ( + EmailRoutingRuleGetResponseResultMatchersFieldTo EmailRoutingRuleGetResponseResultMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleGetResponseResultMatchersType string + +const ( + EmailRoutingRuleGetResponseResultMatchersTypeLiteral EmailRoutingRuleGetResponseResultMatchersType = "literal" +) + +// Whether the API call was successful +type EmailRoutingRuleGetResponseSuccess bool + +const ( + EmailRoutingRuleGetResponseSuccessTrue EmailRoutingRuleGetResponseSuccess = true +) + +type EmailRoutingRuleUpdateResponse struct { + Errors []EmailRoutingRuleUpdateResponseError `json:"errors"` + Messages []EmailRoutingRuleUpdateResponseMessage `json:"messages"` + Result EmailRoutingRuleUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleUpdateResponseSuccess `json:"success"` + JSON emailRoutingRuleUpdateResponseJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseJSON contains the JSON metadata for the struct +// [EmailRoutingRuleUpdateResponse] +type emailRoutingRuleUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleUpdateResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseErrorJSON contains the JSON metadata for the +// struct [EmailRoutingRuleUpdateResponseError] +type emailRoutingRuleUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleUpdateResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseMessageJSON contains the JSON metadata for the +// struct [EmailRoutingRuleUpdateResponseMessage] +type emailRoutingRuleUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleUpdateResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions patterns. + Actions []EmailRoutingRuleUpdateResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleUpdateResponseResultEnabled `json:"enabled"` + // Matching patterns to forward to your actions. + Matchers []EmailRoutingRuleUpdateResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Priority of the routing rule. + Priority float64 `json:"priority"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleUpdateResponseResultJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseResultJSON contains the JSON metadata for the +// struct [EmailRoutingRuleUpdateResponseResult] +type emailRoutingRuleUpdateResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Priority apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Actions pattern. +type EmailRoutingRuleUpdateResponseResultAction struct { + // Type of supported action. + Type EmailRoutingRuleUpdateResponseResultActionsType `json:"type,required"` + Value []string `json:"value,required"` + JSON emailRoutingRuleUpdateResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseResultActionJSON contains the JSON metadata for +// the struct [EmailRoutingRuleUpdateResponseResultAction] +type emailRoutingRuleUpdateResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of supported action. +type EmailRoutingRuleUpdateResponseResultActionsType string + +const ( + EmailRoutingRuleUpdateResponseResultActionsTypeDrop EmailRoutingRuleUpdateResponseResultActionsType = "drop" + EmailRoutingRuleUpdateResponseResultActionsTypeForward EmailRoutingRuleUpdateResponseResultActionsType = "forward" + EmailRoutingRuleUpdateResponseResultActionsTypeWorker EmailRoutingRuleUpdateResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleUpdateResponseResultEnabled bool + +const ( + EmailRoutingRuleUpdateResponseResultEnabledTrue EmailRoutingRuleUpdateResponseResultEnabled = true + EmailRoutingRuleUpdateResponseResultEnabledFalse EmailRoutingRuleUpdateResponseResultEnabled = false +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleUpdateResponseResultMatcher struct { + // Field for type matcher. + Field EmailRoutingRuleUpdateResponseResultMatchersField `json:"field,required"` + // Type of matcher. + Type EmailRoutingRuleUpdateResponseResultMatchersType `json:"type,required"` + // Value for matcher. + Value string `json:"value,required"` + JSON emailRoutingRuleUpdateResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleUpdateResponseResultMatcherJSON contains the JSON metadata for +// the struct [EmailRoutingRuleUpdateResponseResultMatcher] +type emailRoutingRuleUpdateResponseResultMatcherJSON struct { + Field apijson.Field + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleUpdateResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Field for type matcher. +type EmailRoutingRuleUpdateResponseResultMatchersField string + +const ( + EmailRoutingRuleUpdateResponseResultMatchersFieldTo EmailRoutingRuleUpdateResponseResultMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleUpdateResponseResultMatchersType string + +const ( + EmailRoutingRuleUpdateResponseResultMatchersTypeLiteral EmailRoutingRuleUpdateResponseResultMatchersType = "literal" +) + +// Whether the API call was successful +type EmailRoutingRuleUpdateResponseSuccess bool + +const ( + EmailRoutingRuleUpdateResponseSuccessTrue EmailRoutingRuleUpdateResponseSuccess = true +) + +type EmailRoutingRuleDeleteResponse struct { + Errors []EmailRoutingRuleDeleteResponseError `json:"errors"` + Messages []EmailRoutingRuleDeleteResponseMessage `json:"messages"` + Result EmailRoutingRuleDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleDeleteResponseSuccess `json:"success"` + JSON emailRoutingRuleDeleteResponseJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseJSON contains the JSON metadata for the struct +// [EmailRoutingRuleDeleteResponse] +type emailRoutingRuleDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleDeleteResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseErrorJSON contains the JSON metadata for the +// struct [EmailRoutingRuleDeleteResponseError] +type emailRoutingRuleDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleDeleteResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseMessageJSON contains the JSON metadata for the +// struct [EmailRoutingRuleDeleteResponseMessage] +type emailRoutingRuleDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleDeleteResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions patterns. + Actions []EmailRoutingRuleDeleteResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleDeleteResponseResultEnabled `json:"enabled"` + // Matching patterns to forward to your actions. + Matchers []EmailRoutingRuleDeleteResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Priority of the routing rule. + Priority float64 `json:"priority"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleDeleteResponseResultJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseResultJSON contains the JSON metadata for the +// struct [EmailRoutingRuleDeleteResponseResult] +type emailRoutingRuleDeleteResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Priority apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Actions pattern. +type EmailRoutingRuleDeleteResponseResultAction struct { + // Type of supported action. + Type EmailRoutingRuleDeleteResponseResultActionsType `json:"type,required"` + Value []string `json:"value,required"` + JSON emailRoutingRuleDeleteResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseResultActionJSON contains the JSON metadata for +// the struct [EmailRoutingRuleDeleteResponseResultAction] +type emailRoutingRuleDeleteResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of supported action. +type EmailRoutingRuleDeleteResponseResultActionsType string + +const ( + EmailRoutingRuleDeleteResponseResultActionsTypeDrop EmailRoutingRuleDeleteResponseResultActionsType = "drop" + EmailRoutingRuleDeleteResponseResultActionsTypeForward EmailRoutingRuleDeleteResponseResultActionsType = "forward" + EmailRoutingRuleDeleteResponseResultActionsTypeWorker EmailRoutingRuleDeleteResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleDeleteResponseResultEnabled bool + +const ( + EmailRoutingRuleDeleteResponseResultEnabledTrue EmailRoutingRuleDeleteResponseResultEnabled = true + EmailRoutingRuleDeleteResponseResultEnabledFalse EmailRoutingRuleDeleteResponseResultEnabled = false +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleDeleteResponseResultMatcher struct { + // Field for type matcher. + Field EmailRoutingRuleDeleteResponseResultMatchersField `json:"field,required"` + // Type of matcher. + Type EmailRoutingRuleDeleteResponseResultMatchersType `json:"type,required"` + // Value for matcher. + Value string `json:"value,required"` + JSON emailRoutingRuleDeleteResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleDeleteResponseResultMatcherJSON contains the JSON metadata for +// the struct [EmailRoutingRuleDeleteResponseResultMatcher] +type emailRoutingRuleDeleteResponseResultMatcherJSON struct { + Field apijson.Field + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleDeleteResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Field for type matcher. +type EmailRoutingRuleDeleteResponseResultMatchersField string + +const ( + EmailRoutingRuleDeleteResponseResultMatchersFieldTo EmailRoutingRuleDeleteResponseResultMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleDeleteResponseResultMatchersType string + +const ( + EmailRoutingRuleDeleteResponseResultMatchersTypeLiteral EmailRoutingRuleDeleteResponseResultMatchersType = "literal" +) + +// Whether the API call was successful +type EmailRoutingRuleDeleteResponseSuccess bool + +const ( + EmailRoutingRuleDeleteResponseSuccessTrue EmailRoutingRuleDeleteResponseSuccess = true +) + +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse struct { + Errors []EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseError `json:"errors"` + Messages []EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessage `json:"messages"` + Result EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseSuccess `json:"success"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseJSON contains the +// JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseErrorJSON contains +// the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseError] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessage] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions patterns. + Actions []EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabled `json:"enabled"` + // Matching patterns to forward to your actions. + Matchers []EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Priority of the routing rule. + Priority float64 `json:"priority"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResult] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Priority apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Actions pattern. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultAction struct { + // Type of supported action. + Type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsType `json:"type,required"` + Value []string `json:"value,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultAction] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of supported action. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsTypeDrop EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsType = "drop" + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsTypeForward EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsType = "forward" + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsTypeWorker EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabled bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabledTrue EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabled = true + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabledFalse EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultEnabled = false +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcher struct { + // Field for type matcher. + Field EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersField `json:"field,required"` + // Type of matcher. + Type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersType `json:"type,required"` + // Value for matcher. + Value string `json:"value,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcherJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcher] +type emailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcherJSON struct { + Field apijson.Field + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Field for type matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersField string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersFieldTo EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersTypeLiteral EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseResultMatchersType = "literal" +) + +// Whether the API call was successful +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseSuccess bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseSuccessTrue EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleResponseSuccess = true +) + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse struct { + Errors []EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseError `json:"errors"` + Messages []EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessage `json:"messages"` + Result []EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResult `json:"result"` + ResultInfo EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseSuccess `json:"success"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseJSON contains +// the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseError] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessage] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions patterns. + Actions []EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabled `json:"enabled"` + // Matching patterns to forward to your actions. + Matchers []EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Priority of the routing rule. + Priority float64 `json:"priority"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResult] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Priority apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Actions pattern. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultAction struct { + // Type of supported action. + Type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsType `json:"type,required"` + Value []string `json:"value,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultAction] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of supported action. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsTypeDrop EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsType = "drop" + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsTypeForward EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsType = "forward" + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsTypeWorker EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabled bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabledTrue EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabled = true + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabledFalse EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultEnabled = false +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcher struct { + // Field for type matcher. + Field EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersField `json:"field,required"` + // Type of matcher. + Type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersType `json:"type,required"` + // Value for matcher. + Value string `json:"value,required"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcherJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcher] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcherJSON struct { + Field apijson.Field + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Field for type matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersField string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersFieldTo EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersTypeLiteral EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultMatchersType = "literal" +) + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfo struct { + Count interface{} `json:"count"` + Page interface{} `json:"page"` + PerPage interface{} `json:"per_page"` + TotalCount interface{} `json:"total_count"` + JSON emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfoJSON `json:"-"` +} + +// emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfoJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfo] +type emailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseSuccess bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseSuccessTrue EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesResponseSuccess = true +) + +type EmailRoutingRuleUpdateParams struct { + // List actions patterns. + Actions param.Field[[]EmailRoutingRuleUpdateParamsAction] `json:"actions,required"` + // Matching patterns to forward to your actions. + Matchers param.Field[[]EmailRoutingRuleUpdateParamsMatcher] `json:"matchers,required"` + // Routing rule status. + Enabled param.Field[EmailRoutingRuleUpdateParamsEnabled] `json:"enabled"` + // Routing rule name. + Name param.Field[string] `json:"name"` + // Priority of the routing rule. + Priority param.Field[float64] `json:"priority"` +} + +func (r EmailRoutingRuleUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Actions pattern. +type EmailRoutingRuleUpdateParamsAction struct { + // Type of supported action. + Type param.Field[EmailRoutingRuleUpdateParamsActionsType] `json:"type,required"` + Value param.Field[[]string] `json:"value,required"` +} + +func (r EmailRoutingRuleUpdateParamsAction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Type of supported action. +type EmailRoutingRuleUpdateParamsActionsType string + +const ( + EmailRoutingRuleUpdateParamsActionsTypeDrop EmailRoutingRuleUpdateParamsActionsType = "drop" + EmailRoutingRuleUpdateParamsActionsTypeForward EmailRoutingRuleUpdateParamsActionsType = "forward" + EmailRoutingRuleUpdateParamsActionsTypeWorker EmailRoutingRuleUpdateParamsActionsType = "worker" +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleUpdateParamsMatcher struct { + // Field for type matcher. + Field param.Field[EmailRoutingRuleUpdateParamsMatchersField] `json:"field,required"` + // Type of matcher. + Type param.Field[EmailRoutingRuleUpdateParamsMatchersType] `json:"type,required"` + // Value for matcher. + Value param.Field[string] `json:"value,required"` +} + +func (r EmailRoutingRuleUpdateParamsMatcher) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Field for type matcher. +type EmailRoutingRuleUpdateParamsMatchersField string + +const ( + EmailRoutingRuleUpdateParamsMatchersFieldTo EmailRoutingRuleUpdateParamsMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleUpdateParamsMatchersType string + +const ( + EmailRoutingRuleUpdateParamsMatchersTypeLiteral EmailRoutingRuleUpdateParamsMatchersType = "literal" +) + +// Routing rule status. +type EmailRoutingRuleUpdateParamsEnabled bool + +const ( + EmailRoutingRuleUpdateParamsEnabledTrue EmailRoutingRuleUpdateParamsEnabled = true + EmailRoutingRuleUpdateParamsEnabledFalse EmailRoutingRuleUpdateParamsEnabled = false +) + +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParams struct { + // List actions patterns. + Actions param.Field[[]EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsAction] `json:"actions,required"` + // Matching patterns to forward to your actions. + Matchers param.Field[[]EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatcher] `json:"matchers,required"` + // Routing rule status. + Enabled param.Field[EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabled] `json:"enabled"` + // Routing rule name. + Name param.Field[string] `json:"name"` + // Priority of the routing rule. + Priority param.Field[float64] `json:"priority"` +} + +func (r EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Actions pattern. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsAction struct { + // Type of supported action. + Type param.Field[EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsType] `json:"type,required"` + Value param.Field[[]string] `json:"value,required"` +} + +func (r EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsAction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Type of supported action. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeDrop EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsType = "drop" + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeForward EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsType = "forward" + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeWorker EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsType = "worker" +) + +// Matching pattern to forward your actions. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatcher struct { + // Field for type matcher. + Field param.Field[EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersField] `json:"field,required"` + // Type of matcher. + Type param.Field[EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersType] `json:"type,required"` + // Value for matcher. + Value param.Field[string] `json:"value,required"` +} + +func (r EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatcher) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Field for type matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersField string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersFieldTo EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersField = "to" +) + +// Type of matcher. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersType string + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersTypeLiteral EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersType = "literal" +) + +// Routing rule status. +type EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabled bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabledTrue EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabled = true + EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabledFalse EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabled = false +) + +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams struct { + // Filter by enabled routing rules. + Enabled param.Field[EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabled] `query:"enabled"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Maximum number of results per page. + PerPage param.Field[float64] `query:"per_page"` +} + +// URLQuery serializes +// [EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams]'s query +// parameters as `url.Values`. +func (r EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Filter by enabled routing rules. +type EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabled bool + +const ( + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabledTrue EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabled = true + EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabledFalse EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabled = false +) diff --git a/emailroutingrule_test.go b/emailroutingrule_test.go new file mode 100644 index 00000000000..4b9d73d6e8b --- /dev/null +++ b/emailroutingrule_test.go @@ -0,0 +1,223 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingRuleGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "a7e6fb77503c41d8a7f3113c6918f10c", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingRuleUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.Update( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "a7e6fb77503c41d8a7f3113c6918f10c", + cloudflare.EmailRoutingRuleUpdateParams{ + Actions: cloudflare.F([]cloudflare.EmailRoutingRuleUpdateParamsAction{{ + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }}), + Matchers: cloudflare.F([]cloudflare.EmailRoutingRuleUpdateParamsMatcher{{ + Field: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }, { + Field: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }, { + Field: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }}), + Enabled: cloudflare.F(cloudflare.EmailRoutingRuleUpdateParamsEnabledTrue), + Name: cloudflare.F("Send to user@example.net rule."), + Priority: cloudflare.F(0.000000), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingRuleDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.Delete( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "a7e6fb77503c41d8a7f3113c6918f10c", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.EmailRoutingRoutingRulesNewRoutingRule( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParams{ + Actions: cloudflare.F([]cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsAction{{ + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }}), + Matchers: cloudflare.F([]cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatcher{{ + Field: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }, { + Field: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }, { + Field: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersFieldTo), + Type: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsMatchersTypeLiteral), + Value: cloudflare.F("test@example.com"), + }}), + Enabled: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesNewRoutingRuleParamsEnabledTrue), + Name: cloudflare.F("Send to user@example.net rule."), + Priority: cloudflare.F(0.000000), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.EmailRoutingRoutingRulesListRoutingRules( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParams{ + Enabled: cloudflare.F(cloudflare.EmailRoutingRuleEmailRoutingRoutingRulesListRoutingRulesParamsEnabledTrue), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(5.000000), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/emailroutingrulecatchall.go b/emailroutingrulecatchall.go new file mode 100644 index 00000000000..b1ce88dd055 --- /dev/null +++ b/emailroutingrulecatchall.go @@ -0,0 +1,453 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// EmailRoutingRuleCatchAllService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewEmailRoutingRuleCatchAllService] method instead. +type EmailRoutingRuleCatchAllService struct { + Options []option.RequestOption +} + +// NewEmailRoutingRuleCatchAllService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewEmailRoutingRuleCatchAllService(opts ...option.RequestOption) (r *EmailRoutingRuleCatchAllService) { + r = &EmailRoutingRuleCatchAllService{} + r.Options = opts + return +} + +// Get information on the default catch-all routing rule. +func (r *EmailRoutingRuleCatchAllService) EmailRoutingRoutingRulesGetCatchAllRule(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules/catch_all", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Enable or disable catch-all routing rule, or change action to forward to +// specific destination address. +func (r *EmailRoutingRuleCatchAllService) EmailRoutingRoutingRulesUpdateCatchAllRule(ctx context.Context, zoneIdentifier string, body EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParams, opts ...option.RequestOption) (res *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/email/routing/rules/catch_all", zoneIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse struct { + Errors []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseError `json:"errors"` + Messages []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessage `json:"messages"` + Result EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseSuccess `json:"success"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseError] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessage] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions for the catch-all routing rule. + Actions []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabled `json:"enabled"` + // List of matchers for the catch-all routing rule. + Matchers []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResult] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Action for the catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultAction struct { + // Type of action for catch-all rule. + Type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsType `json:"type,required"` + Value []string `json:"value"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultAction] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of action for catch-all rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsTypeDrop EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsType = "drop" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsTypeForward EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsType = "forward" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsTypeWorker EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabled bool + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabledTrue EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabled = true + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabledFalse EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultEnabled = false +) + +// Matcher for catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcher struct { + // Type of matcher. Default is 'all'. + Type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatchersType `json:"type,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcherJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcher] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcherJSON struct { + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of matcher. Default is 'all'. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatchersType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatchersTypeAll EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseResultMatchersType = "all" +) + +// Whether the API call was successful +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseSuccess bool + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseSuccessTrue EmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRuleResponseSuccess = true +) + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse struct { + Errors []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseError `json:"errors"` + Messages []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessage `json:"messages"` + Result EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResult `json:"result"` + // Whether the API call was successful + Success EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseSuccess `json:"success"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseErrorJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseErrorJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseError] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessageJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessageJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessage] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResult struct { + // Routing rule identifier. + ID string `json:"id"` + // List actions for the catch-all routing rule. + Actions []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultAction `json:"actions"` + // Routing rule status. + Enabled EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabled `json:"enabled"` + // List of matchers for the catch-all routing rule. + Matchers []EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcher `json:"matchers"` + // Routing rule name. + Name string `json:"name"` + // Routing rule tag. (Deprecated, replaced by routing rule identifier) + Tag string `json:"tag"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResult] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultJSON struct { + ID apijson.Field + Actions apijson.Field + Enabled apijson.Field + Matchers apijson.Field + Name apijson.Field + Tag apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Action for the catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultAction struct { + // Type of action for catch-all rule. + Type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsType `json:"type,required"` + Value []string `json:"value"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultAction] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultAction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of action for catch-all rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsTypeDrop EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsType = "drop" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsTypeForward EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsType = "forward" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsTypeWorker EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultActionsType = "worker" +) + +// Routing rule status. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabled bool + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabledTrue EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabled = true + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabledFalse EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultEnabled = false +) + +// Matcher for catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcher struct { + // Type of matcher. Default is 'all'. + Type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatchersType `json:"type,required"` + JSON emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcherJSON `json:"-"` +} + +// emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcherJSON +// contains the JSON metadata for the struct +// [EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcher] +type emailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcherJSON struct { + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatcher) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Type of matcher. Default is 'all'. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatchersType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatchersTypeAll EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseResultMatchersType = "all" +) + +// Whether the API call was successful +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseSuccess bool + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseSuccessTrue EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleResponseSuccess = true +) + +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParams struct { + // List actions for the catch-all routing rule. + Actions param.Field[[]EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsAction] `json:"actions,required"` + // List of matchers for the catch-all routing rule. + Matchers param.Field[[]EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatcher] `json:"matchers,required"` + // Routing rule status. + Enabled param.Field[EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabled] `json:"enabled"` + // Routing rule name. + Name param.Field[string] `json:"name"` +} + +func (r EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Action for the catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsAction struct { + // Type of action for catch-all rule. + Type param.Field[EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsType] `json:"type,required"` + Value param.Field[[]string] `json:"value"` +} + +func (r EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsAction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Type of action for catch-all rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeDrop EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsType = "drop" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeForward EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsType = "forward" + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeWorker EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsType = "worker" +) + +// Matcher for catch-all routing rule. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatcher struct { + // Type of matcher. Default is 'all'. + Type param.Field[EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersType] `json:"type,required"` +} + +func (r EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatcher) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Type of matcher. Default is 'all'. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersType string + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersTypeAll EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersType = "all" +) + +// Routing rule status. +type EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabled bool + +const ( + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabledTrue EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabled = true + EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabledFalse EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabled = false +) diff --git a/emailroutingrulecatchall_test.go b/emailroutingrulecatchall_test.go new file mode 100644 index 00000000000..5c1114d5af8 --- /dev/null +++ b/emailroutingrulecatchall_test.go @@ -0,0 +1,90 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestEmailRoutingRuleCatchAllEmailRoutingRoutingRulesGetCatchAllRule(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.CatchAlls.EmailRoutingRoutingRulesGetCatchAllRule(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestEmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Emails.Routings.Rules.CatchAlls.EmailRoutingRoutingRulesUpdateCatchAllRule( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParams{ + Actions: cloudflare.F([]cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsAction{{ + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsActionsTypeForward), + Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}), + }}), + Matchers: cloudflare.F([]cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatcher{{ + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersTypeAll), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersTypeAll), + }, { + Type: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsMatchersTypeAll), + }}), + Enabled: cloudflare.F(cloudflare.EmailRoutingRuleCatchAllEmailRoutingRoutingRulesUpdateCatchAllRuleParamsEnabledTrue), + Name: cloudflare.F("Send to user@example.net rule."), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 73e931472eb..a99e4887e02 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -147,8 +147,9 @@ type RequestConfig struct { HTTPClient *http.Client Middlewares []middleware APIKey string - Email string + APIEmail string APIToken string + UserServiceKey string // If ResponseBodyInto not nil, then we will attempt to deserialize into // ResponseBodyInto. If Destination is a []byte, then it will return the body as // is. diff --git a/internal/shared/union.go b/internal/shared/union.go index 39cc9b4625a..096c12ad2fc 100644 --- a/internal/shared/union.go +++ b/internal/shared/union.go @@ -4,9 +4,194 @@ package shared type UnionString string -func (UnionString) ImplementsAIBaaiBgeBaseEnV1_5ParamsText() {} -func (UnionString) ImplementsAIBaaiBgeLargeEnV1_5ParamsText() {} -func (UnionString) ImplementsAIBaaiBgeSmallEnV1_5ParamsText() {} -func (UnionString) ImplementsAIMetaLlama2_7bChatFp16Response() {} -func (UnionString) ImplementsAIMetaLlama2_7bChatInt8Response() {} -func (UnionString) ImplementsAIMistralMistral7bInstructV0_1Response() {} +func (UnionString) ImplementsAIBaaiBgeBaseEnV1_5ParamsText() {} +func (UnionString) ImplementsAIBaaiBgeLargeEnV1_5ParamsText() {} +func (UnionString) ImplementsAIBaaiBgeSmallEnV1_5ParamsText() {} +func (UnionString) ImplementsAIMetaLlama2_7bChatFp16Response() {} +func (UnionString) ImplementsAIMetaLlama2_7bChatInt8Response() {} +func (UnionString) ImplementsAIMistralMistral7bInstructV0_1Response() {} +func (UnionString) ImplementsAccessAppGetParamsAppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant0AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant1AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant2AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant3AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant4AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant5AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant6AppID() {} +func (UnionString) ImplementsAccessAppUpdateParamsVariant7AppID() {} +func (UnionString) ImplementsAccessAppDeleteParamsAppID() {} +func (UnionString) ImplementsAccessAppRevokeTokenAccessApplicationsRevokeServiceTokensParamsAppID() {} +func (UnionString) ImplementsAccessAppUserPolicyCheckAccessApplicationsTestAccessPoliciesParamsAppID() { +} +func (UnionString) ImplementsAccessKeyAccessKeyConfigurationGetTheAccessKeyConfigurationResponseResult() { +} +func (UnionString) ImplementsAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponseResult() { +} +func (UnionString) ImplementsAccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponseResult() {} + +type UnionFloat float64 + +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsARecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsAaaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsCaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsCertRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsCnameRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsDnskeyRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsDsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsHTTPsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsLocRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsMxRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsNaptrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsNsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsPtrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsSmimeaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsSrvRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsSshfpRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsSvcbRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsTlsaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsTxtRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordGetResponseResultDNSRecordsUriRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsARecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsAaaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsCaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsCertRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsCnameRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsDnskeyRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsDsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsHTTPsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsLocRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsMxRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsNaptrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsNsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsPtrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsSmimeaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsSrvRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsSshfpRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsSvcbRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsTlsaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsTxtRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateResponseResultDNSRecordsUriRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsARecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsAaaaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCaaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCertRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsCnameRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDnskeyRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsDsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsHTTPsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsLocRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsMxRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNaptrRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsNsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsPtrRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSmimeaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSrvRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSshfpRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsSvcbRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTlsaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsTxtRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordResponseResultDNSRecordsUriRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsARecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsAaaaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCaaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCertRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsCnameRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDnskeyRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsDsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsHTTPsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsLocRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsMxRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNaptrRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsNsRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsPtrRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSmimeaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSrvRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSshfpRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsSvcbRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTlsaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsTxtRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneListDNSRecordsResponseResultDNSRecordsUriRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsARecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsAaaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsCaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsCertRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsCnameRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsDnskeyRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsDsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsHTTPsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsLocRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsMxRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsNaptrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsNsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsPtrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsSmimeaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsSrvRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsSshfpRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsSvcbRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsTlsaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsTxtRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordUpdateParamsDNSRecordsUriRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsARecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsAaaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCaaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCertRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsCnameRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDnskeyRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsDsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsHTTPsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsLocRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsMxRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNaptrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsNsRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsPtrRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSmimeaRecordTTL() { +} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSrvRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSshfpRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsSvcbRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTlsaRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsTxtRecordTTL() {} +func (UnionFloat) ImplementsDNSRecordDNSRecordsForAZoneNewDNSRecordParamsDNSRecordsUriRecordTTL() {} +func (UnionFloat) ImplementsEmailRoutingDNSEmailRoutingSettingsEmailRoutingDNSSettingsResponseResultTTL() { +} diff --git a/ip.go b/ip.go new file mode 100644 index 00000000000..ec85591a066 --- /dev/null +++ b/ip.go @@ -0,0 +1,190 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "net/http" + "net/url" + "reflect" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// IPService contains methods and other services that help with interacting with +// the cloudflare API. Note, unlike clients, this service does not read variables +// from the environment automatically. You should not instantiate this service +// directly, and instead use the [NewIPService] method instead. +type IPService struct { + Options []option.RequestOption +} + +// NewIPService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewIPService(opts ...option.RequestOption) (r *IPService) { + r = &IPService{} + r.Options = opts + return +} + +// Get IPs used on the Cloudflare/JD Cloud network, see +// https://www.cloudflare.com/ips for Cloudflare IPs or +// https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD +// Cloud IPs. +func (r *IPService) List(ctx context.Context, query IPListParams, opts ...option.RequestOption) (res *IPListResponse, err error) { + opts = append(r.Options[:], opts...) + path := "ips" + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type IPListResponse struct { + Errors []IPListResponseError `json:"errors"` + Messages []IPListResponseMessage `json:"messages"` + Result IPListResponseResult `json:"result"` + // Whether the API call was successful + Success IPListResponseSuccess `json:"success"` + JSON ipListResponseJSON `json:"-"` +} + +// ipListResponseJSON contains the JSON metadata for the struct [IPListResponse] +type ipListResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IPListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type IPListResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON ipListResponseErrorJSON `json:"-"` +} + +// ipListResponseErrorJSON contains the JSON metadata for the struct +// [IPListResponseError] +type ipListResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IPListResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type IPListResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON ipListResponseMessageJSON `json:"-"` +} + +// ipListResponseMessageJSON contains the JSON metadata for the struct +// [IPListResponseMessage] +type ipListResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IPListResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Union satisfied by [IPListResponseResult12h4PjeVIPs] or +// [IPListResponseResult12h4PjeVIPsJdcloud]. +type IPListResponseResult interface { + implementsIPListResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*IPListResponseResult)(nil)).Elem(), "") +} + +type IPListResponseResult12h4PjeVIPs struct { + // A digest of the IP data. Useful for determining if the data has changed. + Etag string `json:"etag"` + // List of Cloudflare IPv4 CIDR addresses. + Ipv4Cidrs []string `json:"ipv4_cidrs"` + // List of Cloudflare IPv6 CIDR addresses. + IPV6Cidrs []string `json:"ipv6_cidrs"` + JSON ipListResponseResult12h4PjeViPsJSON `json:"-"` +} + +// ipListResponseResult12h4PjeViPsJSON contains the JSON metadata for the struct +// [IPListResponseResult12h4PjeVIPs] +type ipListResponseResult12h4PjeViPsJSON struct { + Etag apijson.Field + Ipv4Cidrs apijson.Field + IPV6Cidrs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IPListResponseResult12h4PjeVIPs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r IPListResponseResult12h4PjeVIPs) implementsIPListResponseResult() {} + +type IPListResponseResult12h4PjeVIPsJdcloud struct { + // A digest of the IP data. Useful for determining if the data has changed. + Etag string `json:"etag"` + // List of Cloudflare IPv4 CIDR addresses. + Ipv4Cidrs []string `json:"ipv4_cidrs"` + // List of Cloudflare IPv6 CIDR addresses. + IPV6Cidrs []string `json:"ipv6_cidrs"` + // List IPv4 and IPv6 CIDRs, only populated if `?networks=jdcloud` is used. + JdcloudCidrs []string `json:"jdcloud_cidrs"` + JSON ipListResponseResult12h4PjeViPsJdcloudJSON `json:"-"` +} + +// ipListResponseResult12h4PjeViPsJdcloudJSON contains the JSON metadata for the +// struct [IPListResponseResult12h4PjeVIPsJdcloud] +type ipListResponseResult12h4PjeViPsJdcloudJSON struct { + Etag apijson.Field + Ipv4Cidrs apijson.Field + IPV6Cidrs apijson.Field + JdcloudCidrs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IPListResponseResult12h4PjeVIPsJdcloud) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r IPListResponseResult12h4PjeVIPsJdcloud) implementsIPListResponseResult() {} + +// Whether the API call was successful +type IPListResponseSuccess bool + +const ( + IPListResponseSuccessTrue IPListResponseSuccess = true +) + +type IPListParams struct { + // Specified as `jdcloud` to list IPs used by JD Cloud data centers. + Networks param.Field[string] `query:"networks"` +} + +// URLQuery serializes [IPListParams]'s query parameters as `url.Values`. +func (r IPListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} diff --git a/ip_test.go b/ip_test.go new file mode 100644 index 00000000000..71e365b388e --- /dev/null +++ b/ip_test.go @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestIPListWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.IPs.List(context.TODO(), cloudflare.IPListParams{ + Networks: cloudflare.F("string"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/zoneloadbalancer.go b/loadbalancer.go similarity index 67% rename from zoneloadbalancer.go rename to loadbalancer.go index ef51aa45563..149f3b24fc5 100644 --- a/zoneloadbalancer.go +++ b/loadbalancer.go @@ -14,26 +14,36 @@ import ( "github.com/cloudflare/cloudflare-sdk-go/option" ) -// ZoneLoadBalancerService contains methods and other services that help with +// LoadBalancerService contains methods and other services that help with // interacting with the cloudflare API. Note, unlike clients, this service does not // read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneLoadBalancerService] method +// this service directly, and instead use the [NewLoadBalancerService] method // instead. -type ZoneLoadBalancerService struct { - Options []option.RequestOption -} - -// NewZoneLoadBalancerService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneLoadBalancerService(opts ...option.RequestOption) (r *ZoneLoadBalancerService) { - r = &ZoneLoadBalancerService{} +type LoadBalancerService struct { + Options []option.RequestOption + Monitors *LoadBalancerMonitorService + Pools *LoadBalancerPoolService + Previews *LoadBalancerPreviewService + Regions *LoadBalancerRegionService + Searches *LoadBalancerSearchService +} + +// NewLoadBalancerService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewLoadBalancerService(opts ...option.RequestOption) (r *LoadBalancerService) { + r = &LoadBalancerService{} r.Options = opts + r.Monitors = NewLoadBalancerMonitorService(opts...) + r.Pools = NewLoadBalancerPoolService(opts...) + r.Previews = NewLoadBalancerPreviewService(opts...) + r.Regions = NewLoadBalancerRegionService(opts...) + r.Searches = NewLoadBalancerSearchService(opts...) return } // Create a new load balancer. -func (r *ZoneLoadBalancerService) New(ctx context.Context, identifier string, body ZoneLoadBalancerNewParams, opts ...option.RequestOption) (res *ZoneLoadBalancerNewResponse, err error) { +func (r *LoadBalancerService) New(ctx context.Context, identifier string, body LoadBalancerNewParams, opts ...option.RequestOption) (res *LoadBalancerNewResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("zones/%s/load_balancers", identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) @@ -41,7 +51,7 @@ func (r *ZoneLoadBalancerService) New(ctx context.Context, identifier string, bo } // Fetch a single configured load balancer. -func (r *ZoneLoadBalancerService) Get(ctx context.Context, identifier1 string, identifier string, opts ...option.RequestOption) (res *ZoneLoadBalancerGetResponse, err error) { +func (r *LoadBalancerService) Get(ctx context.Context, identifier1 string, identifier string, opts ...option.RequestOption) (res *LoadBalancerGetResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("zones/%s/load_balancers/%s", identifier1, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) @@ -49,7 +59,7 @@ func (r *ZoneLoadBalancerService) Get(ctx context.Context, identifier1 string, i } // Update a configured load balancer. -func (r *ZoneLoadBalancerService) Update(ctx context.Context, identifier1 string, identifier string, body ZoneLoadBalancerUpdateParams, opts ...option.RequestOption) (res *ZoneLoadBalancerUpdateResponse, err error) { +func (r *LoadBalancerService) Update(ctx context.Context, identifier1 string, identifier string, body LoadBalancerUpdateParams, opts ...option.RequestOption) (res *LoadBalancerUpdateResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("zones/%s/load_balancers/%s", identifier1, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) @@ -57,7 +67,7 @@ func (r *ZoneLoadBalancerService) Update(ctx context.Context, identifier1 string } // List configured load balancers. -func (r *ZoneLoadBalancerService) List(ctx context.Context, identifier string, opts ...option.RequestOption) (res *ZoneLoadBalancerListResponse, err error) { +func (r *LoadBalancerService) List(ctx context.Context, identifier string, opts ...option.RequestOption) (res *LoadBalancerListResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("zones/%s/load_balancers", identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) @@ -65,25 +75,25 @@ func (r *ZoneLoadBalancerService) List(ctx context.Context, identifier string, o } // Delete a configured load balancer. -func (r *ZoneLoadBalancerService) Delete(ctx context.Context, identifier1 string, identifier string, opts ...option.RequestOption) (res *ZoneLoadBalancerDeleteResponse, err error) { +func (r *LoadBalancerService) Delete(ctx context.Context, identifier1 string, identifier string, opts ...option.RequestOption) (res *LoadBalancerDeleteResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("zones/%s/load_balancers/%s", identifier1, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } -type ZoneLoadBalancerNewResponse struct { - Errors []ZoneLoadBalancerNewResponseError `json:"errors"` - Messages []ZoneLoadBalancerNewResponseMessage `json:"messages"` - Result ZoneLoadBalancerNewResponseResult `json:"result"` +type LoadBalancerNewResponse struct { + Errors []LoadBalancerNewResponseError `json:"errors"` + Messages []LoadBalancerNewResponseMessage `json:"messages"` + Result LoadBalancerNewResponseResult `json:"result"` // Whether the API call was successful - Success ZoneLoadBalancerNewResponseSuccess `json:"success"` - JSON zoneLoadBalancerNewResponseJSON `json:"-"` + Success LoadBalancerNewResponseSuccess `json:"success"` + JSON loadBalancerNewResponseJSON `json:"-"` } -// zoneLoadBalancerNewResponseJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerNewResponse] -type zoneLoadBalancerNewResponseJSON struct { +// loadBalancerNewResponseJSON contains the JSON metadata for the struct +// [LoadBalancerNewResponse] +type loadBalancerNewResponseJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -92,49 +102,49 @@ type zoneLoadBalancerNewResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerNewResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerNewResponseErrorJSON `json:"-"` +type LoadBalancerNewResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerNewResponseErrorJSON `json:"-"` } -// zoneLoadBalancerNewResponseErrorJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerNewResponseError] -type zoneLoadBalancerNewResponseErrorJSON struct { +// loadBalancerNewResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerNewResponseError] +type loadBalancerNewResponseErrorJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseError) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseError) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerNewResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerNewResponseMessageJSON `json:"-"` +type LoadBalancerNewResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerNewResponseMessageJSON `json:"-"` } -// zoneLoadBalancerNewResponseMessageJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerNewResponseMessage] -type zoneLoadBalancerNewResponseMessageJSON struct { +// loadBalancerNewResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerNewResponseMessage] +type loadBalancerNewResponseMessageJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseMessage) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseMessage) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerNewResponseResult struct { +type LoadBalancerNewResponseResult struct { ID string `json:"id"` // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active @@ -142,7 +152,7 @@ type ZoneLoadBalancerNewResponseResult struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerNewResponseResultAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerNewResponseResultAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -160,8 +170,8 @@ type ZoneLoadBalancerNewResponseResult struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerNewResponseResultLocationStrategy `json:"location_strategy"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` + LocationStrategy LoadBalancerNewResponseResultLocationStrategy `json:"location_strategy"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The DNS hostname to associate with your Load Balancer. If this hostname already // exists as a DNS record in Cloudflare's DNS, the Load Balancer will take // precedence and the DNS record will not be used. @@ -181,14 +191,14 @@ type ZoneLoadBalancerNewResponseResult struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerNewResponseResultRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerNewResponseResultRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools interface{} `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules []ZoneLoadBalancerNewResponseResultRule `json:"rules"` + Rules []LoadBalancerNewResponseResultRule `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -212,9 +222,9 @@ type ZoneLoadBalancerNewResponseResult struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerNewResponseResultSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerNewResponseResultSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerNewResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerNewResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -248,16 +258,16 @@ type ZoneLoadBalancerNewResponseResult struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerNewResponseResultSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerNewResponseResultSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerNewResponseResultJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerNewResponseResultJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerNewResponseResult] -type zoneLoadBalancerNewResponseResultJSON struct { +// loadBalancerNewResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerNewResponseResult] +type loadBalancerNewResponseResultJSON struct { ID apijson.Field AdaptiveRouting apijson.Field CountryPools apijson.Field @@ -283,7 +293,7 @@ type zoneLoadBalancerNewResponseResultJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResult) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResult) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -293,39 +303,39 @@ func (r *ZoneLoadBalancerNewResponseResult) UnmarshalJSON(data []byte) (err erro // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerNewResponseResultAdaptiveRouting struct { +type LoadBalancerNewResponseResultAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerNewResponseResultAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerNewResponseResultAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultAdaptiveRoutingJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerNewResponseResultAdaptiveRouting] -type zoneLoadBalancerNewResponseResultAdaptiveRoutingJSON struct { +// loadBalancerNewResponseResultAdaptiveRoutingJSON contains the JSON metadata for +// the struct [LoadBalancerNewResponseResultAdaptiveRouting] +type loadBalancerNewResponseResultAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerNewResponseResultLocationStrategy struct { +type LoadBalancerNewResponseResultLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerNewResponseResultLocationStrategyMode `json:"mode"` + Mode LoadBalancerNewResponseResultLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -333,20 +343,20 @@ type ZoneLoadBalancerNewResponseResultLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerNewResponseResultLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerNewResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerNewResponseResultLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultLocationStrategyJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerNewResponseResultLocationStrategy] -type zoneLoadBalancerNewResponseResultLocationStrategyJSON struct { +// loadBalancerNewResponseResultLocationStrategyJSON contains the JSON metadata for +// the struct [LoadBalancerNewResponseResultLocationStrategy] +type loadBalancerNewResponseResultLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -356,11 +366,11 @@ func (r *ZoneLoadBalancerNewResponseResultLocationStrategy) UnmarshalJSON(data [ // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerNewResponseResultLocationStrategyMode string +type LoadBalancerNewResponseResultLocationStrategyMode string const ( - ZoneLoadBalancerNewResponseResultLocationStrategyModePop ZoneLoadBalancerNewResponseResultLocationStrategyMode = "pop" - ZoneLoadBalancerNewResponseResultLocationStrategyModeResolverIP ZoneLoadBalancerNewResponseResultLocationStrategyMode = "resolver_ip" + LoadBalancerNewResponseResultLocationStrategyModePop LoadBalancerNewResponseResultLocationStrategyMode = "pop" + LoadBalancerNewResponseResultLocationStrategyModeResolverIP LoadBalancerNewResponseResultLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -370,13 +380,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs string +type LoadBalancerNewResponseResultLocationStrategyPreferEcs string const ( - ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcsAlways ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs = "always" - ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcsNever ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs = "never" - ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcsProximity ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcsGeo ZoneLoadBalancerNewResponseResultLocationStrategyPreferEcs = "geo" + LoadBalancerNewResponseResultLocationStrategyPreferEcsAlways LoadBalancerNewResponseResultLocationStrategyPreferEcs = "always" + LoadBalancerNewResponseResultLocationStrategyPreferEcsNever LoadBalancerNewResponseResultLocationStrategyPreferEcs = "never" + LoadBalancerNewResponseResultLocationStrategyPreferEcsProximity LoadBalancerNewResponseResultLocationStrategyPreferEcs = "proximity" + LoadBalancerNewResponseResultLocationStrategyPreferEcsGeo LoadBalancerNewResponseResultLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -387,32 +397,32 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerNewResponseResultRandomSteering struct { +type LoadBalancerNewResponseResultRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerNewResponseResultRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerNewResponseResultRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRandomSteeringJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerNewResponseResultRandomSteering] -type zoneLoadBalancerNewResponseResultRandomSteeringJSON struct { +// loadBalancerNewResponseResultRandomSteeringJSON contains the JSON metadata for +// the struct [LoadBalancerNewResponseResultRandomSteering] +type loadBalancerNewResponseResultRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerNewResponseResultRule struct { +type LoadBalancerNewResponseResultRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -424,12 +434,12 @@ type ZoneLoadBalancerNewResponseResultRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse ZoneLoadBalancerNewResponseResultRulesFixedResponse `json:"fixed_response"` + FixedResponse LoadBalancerNewResponseResultRulesFixedResponse `json:"fixed_response"` // Name of this rule. Only used for human readability. Name string `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides ZoneLoadBalancerNewResponseResultRulesOverrides `json:"overrides"` + Overrides LoadBalancerNewResponseResultRulesOverrides `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -437,13 +447,13 @@ type ZoneLoadBalancerNewResponseResultRule struct { Priority int64 `json:"priority"` // If this rule's condition is true, this causes rule evaluation to stop after // processing this rule. - Terminates bool `json:"terminates"` - JSON zoneLoadBalancerNewResponseResultRuleJSON `json:"-"` + Terminates bool `json:"terminates"` + JSON loadBalancerNewResponseResultRuleJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRuleJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerNewResponseResultRule] -type zoneLoadBalancerNewResponseResultRuleJSON struct { +// loadBalancerNewResponseResultRuleJSON contains the JSON metadata for the struct +// [LoadBalancerNewResponseResultRule] +type loadBalancerNewResponseResultRuleJSON struct { Condition apijson.Field Disabled apijson.Field FixedResponse apijson.Field @@ -455,14 +465,14 @@ type zoneLoadBalancerNewResponseResultRuleJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRule) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRule) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerNewResponseResultRulesFixedResponse struct { +type LoadBalancerNewResponseResultRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType string `json:"content_type"` // The http 'Location' header to include in the response. @@ -470,13 +480,13 @@ type ZoneLoadBalancerNewResponseResultRulesFixedResponse struct { // Text to include as the http body. MessageBody string `json:"message_body"` // The http status code to respond with. - StatusCode int64 `json:"status_code"` - JSON zoneLoadBalancerNewResponseResultRulesFixedResponseJSON `json:"-"` + StatusCode int64 `json:"status_code"` + JSON loadBalancerNewResponseResultRulesFixedResponseJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesFixedResponseJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerNewResponseResultRulesFixedResponse] -type zoneLoadBalancerNewResponseResultRulesFixedResponseJSON struct { +// loadBalancerNewResponseResultRulesFixedResponseJSON contains the JSON metadata +// for the struct [LoadBalancerNewResponseResultRulesFixedResponse] +type loadBalancerNewResponseResultRulesFixedResponseJSON struct { ContentType apijson.Field Location apijson.Field MessageBody apijson.Field @@ -485,20 +495,20 @@ type zoneLoadBalancerNewResponseResultRulesFixedResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerNewResponseResultRulesOverrides struct { +type LoadBalancerNewResponseResultRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerNewResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -511,7 +521,7 @@ type ZoneLoadBalancerNewResponseResultRulesOverrides struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` + LocationStrategy LoadBalancerNewResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -525,7 +535,7 @@ type ZoneLoadBalancerNewResponseResultRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerNewResponseResultRulesOverridesRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerNewResponseResultRulesOverridesRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -553,9 +563,9 @@ type ZoneLoadBalancerNewResponseResultRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerNewResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -589,16 +599,16 @@ type ZoneLoadBalancerNewResponseResultRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerNewResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerNewResponseResultRulesOverridesJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerNewResponseResultRulesOverridesJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesOverridesJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerNewResponseResultRulesOverrides] -type zoneLoadBalancerNewResponseResultRulesOverridesJSON struct { +// loadBalancerNewResponseResultRulesOverridesJSON contains the JSON metadata for +// the struct [LoadBalancerNewResponseResultRulesOverrides] +type loadBalancerNewResponseResultRulesOverridesJSON struct { AdaptiveRouting apijson.Field CountryPools apijson.Field DefaultPools apijson.Field @@ -616,7 +626,7 @@ type zoneLoadBalancerNewResponseResultRulesOverridesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -626,40 +636,40 @@ func (r *ZoneLoadBalancerNewResponseResultRulesOverrides) UnmarshalJSON(data []b // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRouting struct { +type LoadBalancerNewResponseResultRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRouting] -type zoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON struct { +// loadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON contains the JSON +// metadata for the struct +// [LoadBalancerNewResponseResultRulesOverridesAdaptiveRouting] +type loadBalancerNewResponseResultRulesOverridesAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy struct { +type LoadBalancerNewResponseResultRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyMode `json:"mode"` + Mode LoadBalancerNewResponseResultRulesOverridesLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -667,21 +677,21 @@ type ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerNewResponseResultRulesOverridesLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyJSON contains the +// loadBalancerNewResponseResultRulesOverridesLocationStrategyJSON contains the // JSON metadata for the struct -// [ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy] -type zoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyJSON struct { +// [LoadBalancerNewResponseResultRulesOverridesLocationStrategy] +type loadBalancerNewResponseResultRulesOverridesLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -691,11 +701,11 @@ func (r *ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategy) Unmars // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyMode string +type LoadBalancerNewResponseResultRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyModePop ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyModePop LoadBalancerNewResponseResultRulesOverridesLocationStrategyMode = "pop" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyModeResolverIP LoadBalancerNewResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -705,13 +715,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsNever LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerNewResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -722,27 +732,27 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerNewResponseResultRulesOverridesRandomSteering struct { +type LoadBalancerNewResponseResultRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerNewResponseResultRulesOverridesRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerNewResponseResultRulesOverridesRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesOverridesRandomSteeringJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerNewResponseResultRulesOverridesRandomSteering] -type zoneLoadBalancerNewResponseResultRulesOverridesRandomSteeringJSON struct { +// loadBalancerNewResponseResultRulesOverridesRandomSteeringJSON contains the JSON +// metadata for the struct +// [LoadBalancerNewResponseResultRulesOverridesRandomSteering] +type loadBalancerNewResponseResultRulesOverridesRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -769,18 +779,18 @@ func (r *ZoneLoadBalancerNewResponseResultRulesOverridesRandomSteering) Unmarsha // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity string +type LoadBalancerNewResponseResultRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityNone ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityCookie ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityHeader ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityEmpty ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinity = "\"\"" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityNone LoadBalancerNewResponseResultRulesOverridesSessionAffinity = "none" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityCookie LoadBalancerNewResponseResultRulesOverridesSessionAffinity = "cookie" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityIPCookie LoadBalancerNewResponseResultRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityHeader LoadBalancerNewResponseResultRulesOverridesSessionAffinity = "header" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityEmpty LoadBalancerNewResponseResultRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -807,12 +817,12 @@ type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes st // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -824,14 +834,14 @@ type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes st // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON +// loadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON // contains the JSON metadata for the struct -// [ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes] -type zoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON struct { +// [LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes] +type loadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -842,32 +852,32 @@ type zoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesJSO ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -881,12 +891,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerNewResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -911,17 +921,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy string +type LoadBalancerNewResponseResultRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyOff ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyGeo ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyRandom ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyProximity ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyOff LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "off" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyGeo LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "geo" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyRandom LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "random" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyDynamicLatency LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyProximity LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "proximity" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyLeastConnections LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerNewResponseResultRulesOverridesSteeringPolicyEmpty LoadBalancerNewResponseResultRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -947,18 +957,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerNewResponseResultSessionAffinity string +type LoadBalancerNewResponseResultSessionAffinity string const ( - ZoneLoadBalancerNewResponseResultSessionAffinityNone ZoneLoadBalancerNewResponseResultSessionAffinity = "none" - ZoneLoadBalancerNewResponseResultSessionAffinityCookie ZoneLoadBalancerNewResponseResultSessionAffinity = "cookie" - ZoneLoadBalancerNewResponseResultSessionAffinityIPCookie ZoneLoadBalancerNewResponseResultSessionAffinity = "ip_cookie" - ZoneLoadBalancerNewResponseResultSessionAffinityHeader ZoneLoadBalancerNewResponseResultSessionAffinity = "header" - ZoneLoadBalancerNewResponseResultSessionAffinityEmpty ZoneLoadBalancerNewResponseResultSessionAffinity = "\"\"" + LoadBalancerNewResponseResultSessionAffinityNone LoadBalancerNewResponseResultSessionAffinity = "none" + LoadBalancerNewResponseResultSessionAffinityCookie LoadBalancerNewResponseResultSessionAffinity = "cookie" + LoadBalancerNewResponseResultSessionAffinityIPCookie LoadBalancerNewResponseResultSessionAffinity = "ip_cookie" + LoadBalancerNewResponseResultSessionAffinityHeader LoadBalancerNewResponseResultSessionAffinity = "header" + LoadBalancerNewResponseResultSessionAffinityEmpty LoadBalancerNewResponseResultSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerNewResponseResultSessionAffinityAttributes struct { +type LoadBalancerNewResponseResultSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -985,12 +995,12 @@ type ZoneLoadBalancerNewResponseResultSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerNewResponseResultSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerNewResponseResultSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -1002,14 +1012,13 @@ type ZoneLoadBalancerNewResponseResultSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerNewResponseResultSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerNewResponseResultSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerNewResponseResultSessionAffinityAttributesJSON contains the JSON -// metadata for the struct -// [ZoneLoadBalancerNewResponseResultSessionAffinityAttributes] -type zoneLoadBalancerNewResponseResultSessionAffinityAttributesJSON struct { +// loadBalancerNewResponseResultSessionAffinityAttributesJSON contains the JSON +// metadata for the struct [LoadBalancerNewResponseResultSessionAffinityAttributes] +type loadBalancerNewResponseResultSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -1020,32 +1029,32 @@ type zoneLoadBalancerNewResponseResultSessionAffinityAttributesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerNewResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerNewResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite string +type LoadBalancerNewResponseResultSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesiteLax ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesiteNone ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Strict" + LoadBalancerNewResponseResultSessionAffinityAttributesSamesiteAuto LoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Auto" + LoadBalancerNewResponseResultSessionAffinityAttributesSamesiteLax LoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Lax" + LoadBalancerNewResponseResultSessionAffinityAttributesSamesiteNone LoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "None" + LoadBalancerNewResponseResultSessionAffinityAttributesSamesiteStrict LoadBalancerNewResponseResultSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecure string +type LoadBalancerNewResponseResultSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecureAuto ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecureAlways ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecureNever ZoneLoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Never" + LoadBalancerNewResponseResultSessionAffinityAttributesSecureAuto LoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Auto" + LoadBalancerNewResponseResultSessionAffinityAttributesSecureAlways LoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Always" + LoadBalancerNewResponseResultSessionAffinityAttributesSecureNever LoadBalancerNewResponseResultSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -1059,12 +1068,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerNewResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -1089,38 +1098,38 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerNewResponseResultSteeringPolicy string +type LoadBalancerNewResponseResultSteeringPolicy string const ( - ZoneLoadBalancerNewResponseResultSteeringPolicyOff ZoneLoadBalancerNewResponseResultSteeringPolicy = "off" - ZoneLoadBalancerNewResponseResultSteeringPolicyGeo ZoneLoadBalancerNewResponseResultSteeringPolicy = "geo" - ZoneLoadBalancerNewResponseResultSteeringPolicyRandom ZoneLoadBalancerNewResponseResultSteeringPolicy = "random" - ZoneLoadBalancerNewResponseResultSteeringPolicyDynamicLatency ZoneLoadBalancerNewResponseResultSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerNewResponseResultSteeringPolicyProximity ZoneLoadBalancerNewResponseResultSteeringPolicy = "proximity" - ZoneLoadBalancerNewResponseResultSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerNewResponseResultSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerNewResponseResultSteeringPolicyLeastConnections ZoneLoadBalancerNewResponseResultSteeringPolicy = "least_connections" - ZoneLoadBalancerNewResponseResultSteeringPolicyEmpty ZoneLoadBalancerNewResponseResultSteeringPolicy = "\"\"" + LoadBalancerNewResponseResultSteeringPolicyOff LoadBalancerNewResponseResultSteeringPolicy = "off" + LoadBalancerNewResponseResultSteeringPolicyGeo LoadBalancerNewResponseResultSteeringPolicy = "geo" + LoadBalancerNewResponseResultSteeringPolicyRandom LoadBalancerNewResponseResultSteeringPolicy = "random" + LoadBalancerNewResponseResultSteeringPolicyDynamicLatency LoadBalancerNewResponseResultSteeringPolicy = "dynamic_latency" + LoadBalancerNewResponseResultSteeringPolicyProximity LoadBalancerNewResponseResultSteeringPolicy = "proximity" + LoadBalancerNewResponseResultSteeringPolicyLeastOutstandingRequests LoadBalancerNewResponseResultSteeringPolicy = "least_outstanding_requests" + LoadBalancerNewResponseResultSteeringPolicyLeastConnections LoadBalancerNewResponseResultSteeringPolicy = "least_connections" + LoadBalancerNewResponseResultSteeringPolicyEmpty LoadBalancerNewResponseResultSteeringPolicy = "\"\"" ) // Whether the API call was successful -type ZoneLoadBalancerNewResponseSuccess bool +type LoadBalancerNewResponseSuccess bool const ( - ZoneLoadBalancerNewResponseSuccessTrue ZoneLoadBalancerNewResponseSuccess = true + LoadBalancerNewResponseSuccessTrue LoadBalancerNewResponseSuccess = true ) -type ZoneLoadBalancerGetResponse struct { - Errors []ZoneLoadBalancerGetResponseError `json:"errors"` - Messages []ZoneLoadBalancerGetResponseMessage `json:"messages"` - Result ZoneLoadBalancerGetResponseResult `json:"result"` +type LoadBalancerGetResponse struct { + Errors []LoadBalancerGetResponseError `json:"errors"` + Messages []LoadBalancerGetResponseMessage `json:"messages"` + Result LoadBalancerGetResponseResult `json:"result"` // Whether the API call was successful - Success ZoneLoadBalancerGetResponseSuccess `json:"success"` - JSON zoneLoadBalancerGetResponseJSON `json:"-"` + Success LoadBalancerGetResponseSuccess `json:"success"` + JSON loadBalancerGetResponseJSON `json:"-"` } -// zoneLoadBalancerGetResponseJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerGetResponse] -type zoneLoadBalancerGetResponseJSON struct { +// loadBalancerGetResponseJSON contains the JSON metadata for the struct +// [LoadBalancerGetResponse] +type loadBalancerGetResponseJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -1129,49 +1138,49 @@ type zoneLoadBalancerGetResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerGetResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerGetResponseErrorJSON `json:"-"` +type LoadBalancerGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerGetResponseErrorJSON `json:"-"` } -// zoneLoadBalancerGetResponseErrorJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerGetResponseError] -type zoneLoadBalancerGetResponseErrorJSON struct { +// loadBalancerGetResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerGetResponseError] +type loadBalancerGetResponseErrorJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseError) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseError) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerGetResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerGetResponseMessageJSON `json:"-"` +type LoadBalancerGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerGetResponseMessageJSON `json:"-"` } -// zoneLoadBalancerGetResponseMessageJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerGetResponseMessage] -type zoneLoadBalancerGetResponseMessageJSON struct { +// loadBalancerGetResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerGetResponseMessage] +type loadBalancerGetResponseMessageJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseMessage) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseMessage) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerGetResponseResult struct { +type LoadBalancerGetResponseResult struct { ID string `json:"id"` // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active @@ -1179,7 +1188,7 @@ type ZoneLoadBalancerGetResponseResult struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerGetResponseResultAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerGetResponseResultAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -1197,8 +1206,8 @@ type ZoneLoadBalancerGetResponseResult struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerGetResponseResultLocationStrategy `json:"location_strategy"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` + LocationStrategy LoadBalancerGetResponseResultLocationStrategy `json:"location_strategy"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The DNS hostname to associate with your Load Balancer. If this hostname already // exists as a DNS record in Cloudflare's DNS, the Load Balancer will take // precedence and the DNS record will not be used. @@ -1218,14 +1227,14 @@ type ZoneLoadBalancerGetResponseResult struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerGetResponseResultRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerGetResponseResultRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools interface{} `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules []ZoneLoadBalancerGetResponseResultRule `json:"rules"` + Rules []LoadBalancerGetResponseResultRule `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -1249,9 +1258,9 @@ type ZoneLoadBalancerGetResponseResult struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerGetResponseResultSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerGetResponseResultSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerGetResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerGetResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -1285,16 +1294,16 @@ type ZoneLoadBalancerGetResponseResult struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerGetResponseResultSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerGetResponseResultSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerGetResponseResultJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerGetResponseResultJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerGetResponseResult] -type zoneLoadBalancerGetResponseResultJSON struct { +// loadBalancerGetResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerGetResponseResult] +type loadBalancerGetResponseResultJSON struct { ID apijson.Field AdaptiveRouting apijson.Field CountryPools apijson.Field @@ -1320,7 +1329,7 @@ type zoneLoadBalancerGetResponseResultJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResult) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResult) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -1330,39 +1339,39 @@ func (r *ZoneLoadBalancerGetResponseResult) UnmarshalJSON(data []byte) (err erro // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerGetResponseResultAdaptiveRouting struct { +type LoadBalancerGetResponseResultAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerGetResponseResultAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerGetResponseResultAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultAdaptiveRoutingJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerGetResponseResultAdaptiveRouting] -type zoneLoadBalancerGetResponseResultAdaptiveRoutingJSON struct { +// loadBalancerGetResponseResultAdaptiveRoutingJSON contains the JSON metadata for +// the struct [LoadBalancerGetResponseResultAdaptiveRouting] +type loadBalancerGetResponseResultAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerGetResponseResultLocationStrategy struct { +type LoadBalancerGetResponseResultLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerGetResponseResultLocationStrategyMode `json:"mode"` + Mode LoadBalancerGetResponseResultLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -1370,20 +1379,20 @@ type ZoneLoadBalancerGetResponseResultLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerGetResponseResultLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerGetResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerGetResponseResultLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultLocationStrategyJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerGetResponseResultLocationStrategy] -type zoneLoadBalancerGetResponseResultLocationStrategyJSON struct { +// loadBalancerGetResponseResultLocationStrategyJSON contains the JSON metadata for +// the struct [LoadBalancerGetResponseResultLocationStrategy] +type loadBalancerGetResponseResultLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -1393,11 +1402,11 @@ func (r *ZoneLoadBalancerGetResponseResultLocationStrategy) UnmarshalJSON(data [ // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerGetResponseResultLocationStrategyMode string +type LoadBalancerGetResponseResultLocationStrategyMode string const ( - ZoneLoadBalancerGetResponseResultLocationStrategyModePop ZoneLoadBalancerGetResponseResultLocationStrategyMode = "pop" - ZoneLoadBalancerGetResponseResultLocationStrategyModeResolverIP ZoneLoadBalancerGetResponseResultLocationStrategyMode = "resolver_ip" + LoadBalancerGetResponseResultLocationStrategyModePop LoadBalancerGetResponseResultLocationStrategyMode = "pop" + LoadBalancerGetResponseResultLocationStrategyModeResolverIP LoadBalancerGetResponseResultLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -1407,13 +1416,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs string +type LoadBalancerGetResponseResultLocationStrategyPreferEcs string const ( - ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcsAlways ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs = "always" - ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcsNever ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs = "never" - ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcsProximity ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcsGeo ZoneLoadBalancerGetResponseResultLocationStrategyPreferEcs = "geo" + LoadBalancerGetResponseResultLocationStrategyPreferEcsAlways LoadBalancerGetResponseResultLocationStrategyPreferEcs = "always" + LoadBalancerGetResponseResultLocationStrategyPreferEcsNever LoadBalancerGetResponseResultLocationStrategyPreferEcs = "never" + LoadBalancerGetResponseResultLocationStrategyPreferEcsProximity LoadBalancerGetResponseResultLocationStrategyPreferEcs = "proximity" + LoadBalancerGetResponseResultLocationStrategyPreferEcsGeo LoadBalancerGetResponseResultLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -1424,32 +1433,32 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerGetResponseResultRandomSteering struct { +type LoadBalancerGetResponseResultRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerGetResponseResultRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerGetResponseResultRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRandomSteeringJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerGetResponseResultRandomSteering] -type zoneLoadBalancerGetResponseResultRandomSteeringJSON struct { +// loadBalancerGetResponseResultRandomSteeringJSON contains the JSON metadata for +// the struct [LoadBalancerGetResponseResultRandomSteering] +type loadBalancerGetResponseResultRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerGetResponseResultRule struct { +type LoadBalancerGetResponseResultRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -1461,12 +1470,12 @@ type ZoneLoadBalancerGetResponseResultRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse ZoneLoadBalancerGetResponseResultRulesFixedResponse `json:"fixed_response"` + FixedResponse LoadBalancerGetResponseResultRulesFixedResponse `json:"fixed_response"` // Name of this rule. Only used for human readability. Name string `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides ZoneLoadBalancerGetResponseResultRulesOverrides `json:"overrides"` + Overrides LoadBalancerGetResponseResultRulesOverrides `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -1474,13 +1483,13 @@ type ZoneLoadBalancerGetResponseResultRule struct { Priority int64 `json:"priority"` // If this rule's condition is true, this causes rule evaluation to stop after // processing this rule. - Terminates bool `json:"terminates"` - JSON zoneLoadBalancerGetResponseResultRuleJSON `json:"-"` + Terminates bool `json:"terminates"` + JSON loadBalancerGetResponseResultRuleJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRuleJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerGetResponseResultRule] -type zoneLoadBalancerGetResponseResultRuleJSON struct { +// loadBalancerGetResponseResultRuleJSON contains the JSON metadata for the struct +// [LoadBalancerGetResponseResultRule] +type loadBalancerGetResponseResultRuleJSON struct { Condition apijson.Field Disabled apijson.Field FixedResponse apijson.Field @@ -1492,14 +1501,14 @@ type zoneLoadBalancerGetResponseResultRuleJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRule) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRule) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerGetResponseResultRulesFixedResponse struct { +type LoadBalancerGetResponseResultRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType string `json:"content_type"` // The http 'Location' header to include in the response. @@ -1507,13 +1516,13 @@ type ZoneLoadBalancerGetResponseResultRulesFixedResponse struct { // Text to include as the http body. MessageBody string `json:"message_body"` // The http status code to respond with. - StatusCode int64 `json:"status_code"` - JSON zoneLoadBalancerGetResponseResultRulesFixedResponseJSON `json:"-"` + StatusCode int64 `json:"status_code"` + JSON loadBalancerGetResponseResultRulesFixedResponseJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesFixedResponseJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerGetResponseResultRulesFixedResponse] -type zoneLoadBalancerGetResponseResultRulesFixedResponseJSON struct { +// loadBalancerGetResponseResultRulesFixedResponseJSON contains the JSON metadata +// for the struct [LoadBalancerGetResponseResultRulesFixedResponse] +type loadBalancerGetResponseResultRulesFixedResponseJSON struct { ContentType apijson.Field Location apijson.Field MessageBody apijson.Field @@ -1522,20 +1531,20 @@ type zoneLoadBalancerGetResponseResultRulesFixedResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerGetResponseResultRulesOverrides struct { +type LoadBalancerGetResponseResultRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerGetResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -1548,7 +1557,7 @@ type ZoneLoadBalancerGetResponseResultRulesOverrides struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` + LocationStrategy LoadBalancerGetResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -1562,7 +1571,7 @@ type ZoneLoadBalancerGetResponseResultRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerGetResponseResultRulesOverridesRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerGetResponseResultRulesOverridesRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -1590,9 +1599,9 @@ type ZoneLoadBalancerGetResponseResultRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerGetResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -1626,16 +1635,16 @@ type ZoneLoadBalancerGetResponseResultRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerGetResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerGetResponseResultRulesOverridesJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerGetResponseResultRulesOverridesJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesOverridesJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerGetResponseResultRulesOverrides] -type zoneLoadBalancerGetResponseResultRulesOverridesJSON struct { +// loadBalancerGetResponseResultRulesOverridesJSON contains the JSON metadata for +// the struct [LoadBalancerGetResponseResultRulesOverrides] +type loadBalancerGetResponseResultRulesOverridesJSON struct { AdaptiveRouting apijson.Field CountryPools apijson.Field DefaultPools apijson.Field @@ -1653,7 +1662,7 @@ type zoneLoadBalancerGetResponseResultRulesOverridesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -1663,40 +1672,40 @@ func (r *ZoneLoadBalancerGetResponseResultRulesOverrides) UnmarshalJSON(data []b // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRouting struct { +type LoadBalancerGetResponseResultRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRouting] -type zoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON struct { +// loadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON contains the JSON +// metadata for the struct +// [LoadBalancerGetResponseResultRulesOverridesAdaptiveRouting] +type loadBalancerGetResponseResultRulesOverridesAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy struct { +type LoadBalancerGetResponseResultRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyMode `json:"mode"` + Mode LoadBalancerGetResponseResultRulesOverridesLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -1704,21 +1713,21 @@ type ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerGetResponseResultRulesOverridesLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyJSON contains the +// loadBalancerGetResponseResultRulesOverridesLocationStrategyJSON contains the // JSON metadata for the struct -// [ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy] -type zoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyJSON struct { +// [LoadBalancerGetResponseResultRulesOverridesLocationStrategy] +type loadBalancerGetResponseResultRulesOverridesLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -1728,11 +1737,11 @@ func (r *ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategy) Unmars // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyMode string +type LoadBalancerGetResponseResultRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyModePop ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyModePop LoadBalancerGetResponseResultRulesOverridesLocationStrategyMode = "pop" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyModeResolverIP LoadBalancerGetResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -1742,13 +1751,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsNever LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerGetResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -1759,27 +1768,27 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerGetResponseResultRulesOverridesRandomSteering struct { +type LoadBalancerGetResponseResultRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerGetResponseResultRulesOverridesRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerGetResponseResultRulesOverridesRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesOverridesRandomSteeringJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerGetResponseResultRulesOverridesRandomSteering] -type zoneLoadBalancerGetResponseResultRulesOverridesRandomSteeringJSON struct { +// loadBalancerGetResponseResultRulesOverridesRandomSteeringJSON contains the JSON +// metadata for the struct +// [LoadBalancerGetResponseResultRulesOverridesRandomSteering] +type loadBalancerGetResponseResultRulesOverridesRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -1806,18 +1815,18 @@ func (r *ZoneLoadBalancerGetResponseResultRulesOverridesRandomSteering) Unmarsha // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity string +type LoadBalancerGetResponseResultRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityNone ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityCookie ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityHeader ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityEmpty ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinity = "\"\"" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityNone LoadBalancerGetResponseResultRulesOverridesSessionAffinity = "none" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityCookie LoadBalancerGetResponseResultRulesOverridesSessionAffinity = "cookie" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityIPCookie LoadBalancerGetResponseResultRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityHeader LoadBalancerGetResponseResultRulesOverridesSessionAffinity = "header" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityEmpty LoadBalancerGetResponseResultRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -1844,12 +1853,12 @@ type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes st // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -1861,14 +1870,14 @@ type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes st // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON +// loadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON // contains the JSON metadata for the struct -// [ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes] -type zoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON struct { +// [LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes] +type loadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -1879,32 +1888,32 @@ type zoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesJSO ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -1918,12 +1927,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerGetResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -1948,17 +1957,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy string +type LoadBalancerGetResponseResultRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyOff ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyGeo ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyRandom ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyProximity ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyOff LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "off" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyGeo LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "geo" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyRandom LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "random" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyDynamicLatency LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyProximity LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "proximity" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyLeastConnections LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerGetResponseResultRulesOverridesSteeringPolicyEmpty LoadBalancerGetResponseResultRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -1984,18 +1993,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerGetResponseResultSessionAffinity string +type LoadBalancerGetResponseResultSessionAffinity string const ( - ZoneLoadBalancerGetResponseResultSessionAffinityNone ZoneLoadBalancerGetResponseResultSessionAffinity = "none" - ZoneLoadBalancerGetResponseResultSessionAffinityCookie ZoneLoadBalancerGetResponseResultSessionAffinity = "cookie" - ZoneLoadBalancerGetResponseResultSessionAffinityIPCookie ZoneLoadBalancerGetResponseResultSessionAffinity = "ip_cookie" - ZoneLoadBalancerGetResponseResultSessionAffinityHeader ZoneLoadBalancerGetResponseResultSessionAffinity = "header" - ZoneLoadBalancerGetResponseResultSessionAffinityEmpty ZoneLoadBalancerGetResponseResultSessionAffinity = "\"\"" + LoadBalancerGetResponseResultSessionAffinityNone LoadBalancerGetResponseResultSessionAffinity = "none" + LoadBalancerGetResponseResultSessionAffinityCookie LoadBalancerGetResponseResultSessionAffinity = "cookie" + LoadBalancerGetResponseResultSessionAffinityIPCookie LoadBalancerGetResponseResultSessionAffinity = "ip_cookie" + LoadBalancerGetResponseResultSessionAffinityHeader LoadBalancerGetResponseResultSessionAffinity = "header" + LoadBalancerGetResponseResultSessionAffinityEmpty LoadBalancerGetResponseResultSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerGetResponseResultSessionAffinityAttributes struct { +type LoadBalancerGetResponseResultSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -2022,12 +2031,12 @@ type ZoneLoadBalancerGetResponseResultSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerGetResponseResultSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerGetResponseResultSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -2039,14 +2048,13 @@ type ZoneLoadBalancerGetResponseResultSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerGetResponseResultSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerGetResponseResultSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerGetResponseResultSessionAffinityAttributesJSON contains the JSON -// metadata for the struct -// [ZoneLoadBalancerGetResponseResultSessionAffinityAttributes] -type zoneLoadBalancerGetResponseResultSessionAffinityAttributesJSON struct { +// loadBalancerGetResponseResultSessionAffinityAttributesJSON contains the JSON +// metadata for the struct [LoadBalancerGetResponseResultSessionAffinityAttributes] +type loadBalancerGetResponseResultSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -2057,32 +2065,32 @@ type zoneLoadBalancerGetResponseResultSessionAffinityAttributesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerGetResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerGetResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite string +type LoadBalancerGetResponseResultSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesiteLax ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesiteNone ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Strict" + LoadBalancerGetResponseResultSessionAffinityAttributesSamesiteAuto LoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Auto" + LoadBalancerGetResponseResultSessionAffinityAttributesSamesiteLax LoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Lax" + LoadBalancerGetResponseResultSessionAffinityAttributesSamesiteNone LoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "None" + LoadBalancerGetResponseResultSessionAffinityAttributesSamesiteStrict LoadBalancerGetResponseResultSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecure string +type LoadBalancerGetResponseResultSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecureAuto ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecureAlways ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecureNever ZoneLoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Never" + LoadBalancerGetResponseResultSessionAffinityAttributesSecureAuto LoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Auto" + LoadBalancerGetResponseResultSessionAffinityAttributesSecureAlways LoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Always" + LoadBalancerGetResponseResultSessionAffinityAttributesSecureNever LoadBalancerGetResponseResultSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -2096,12 +2104,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerGetResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -2126,38 +2134,38 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerGetResponseResultSteeringPolicy string +type LoadBalancerGetResponseResultSteeringPolicy string const ( - ZoneLoadBalancerGetResponseResultSteeringPolicyOff ZoneLoadBalancerGetResponseResultSteeringPolicy = "off" - ZoneLoadBalancerGetResponseResultSteeringPolicyGeo ZoneLoadBalancerGetResponseResultSteeringPolicy = "geo" - ZoneLoadBalancerGetResponseResultSteeringPolicyRandom ZoneLoadBalancerGetResponseResultSteeringPolicy = "random" - ZoneLoadBalancerGetResponseResultSteeringPolicyDynamicLatency ZoneLoadBalancerGetResponseResultSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerGetResponseResultSteeringPolicyProximity ZoneLoadBalancerGetResponseResultSteeringPolicy = "proximity" - ZoneLoadBalancerGetResponseResultSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerGetResponseResultSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerGetResponseResultSteeringPolicyLeastConnections ZoneLoadBalancerGetResponseResultSteeringPolicy = "least_connections" - ZoneLoadBalancerGetResponseResultSteeringPolicyEmpty ZoneLoadBalancerGetResponseResultSteeringPolicy = "\"\"" + LoadBalancerGetResponseResultSteeringPolicyOff LoadBalancerGetResponseResultSteeringPolicy = "off" + LoadBalancerGetResponseResultSteeringPolicyGeo LoadBalancerGetResponseResultSteeringPolicy = "geo" + LoadBalancerGetResponseResultSteeringPolicyRandom LoadBalancerGetResponseResultSteeringPolicy = "random" + LoadBalancerGetResponseResultSteeringPolicyDynamicLatency LoadBalancerGetResponseResultSteeringPolicy = "dynamic_latency" + LoadBalancerGetResponseResultSteeringPolicyProximity LoadBalancerGetResponseResultSteeringPolicy = "proximity" + LoadBalancerGetResponseResultSteeringPolicyLeastOutstandingRequests LoadBalancerGetResponseResultSteeringPolicy = "least_outstanding_requests" + LoadBalancerGetResponseResultSteeringPolicyLeastConnections LoadBalancerGetResponseResultSteeringPolicy = "least_connections" + LoadBalancerGetResponseResultSteeringPolicyEmpty LoadBalancerGetResponseResultSteeringPolicy = "\"\"" ) // Whether the API call was successful -type ZoneLoadBalancerGetResponseSuccess bool +type LoadBalancerGetResponseSuccess bool const ( - ZoneLoadBalancerGetResponseSuccessTrue ZoneLoadBalancerGetResponseSuccess = true + LoadBalancerGetResponseSuccessTrue LoadBalancerGetResponseSuccess = true ) -type ZoneLoadBalancerUpdateResponse struct { - Errors []ZoneLoadBalancerUpdateResponseError `json:"errors"` - Messages []ZoneLoadBalancerUpdateResponseMessage `json:"messages"` - Result ZoneLoadBalancerUpdateResponseResult `json:"result"` +type LoadBalancerUpdateResponse struct { + Errors []LoadBalancerUpdateResponseError `json:"errors"` + Messages []LoadBalancerUpdateResponseMessage `json:"messages"` + Result LoadBalancerUpdateResponseResult `json:"result"` // Whether the API call was successful - Success ZoneLoadBalancerUpdateResponseSuccess `json:"success"` - JSON zoneLoadBalancerUpdateResponseJSON `json:"-"` + Success LoadBalancerUpdateResponseSuccess `json:"success"` + JSON loadBalancerUpdateResponseJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponse] -type zoneLoadBalancerUpdateResponseJSON struct { +// loadBalancerUpdateResponseJSON contains the JSON metadata for the struct +// [LoadBalancerUpdateResponse] +type loadBalancerUpdateResponseJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -2166,49 +2174,49 @@ type zoneLoadBalancerUpdateResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerUpdateResponseErrorJSON `json:"-"` +type LoadBalancerUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerUpdateResponseErrorJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerUpdateResponseError] -type zoneLoadBalancerUpdateResponseErrorJSON struct { +// loadBalancerUpdateResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerUpdateResponseError] +type loadBalancerUpdateResponseErrorJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseError) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseError) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerUpdateResponseMessageJSON `json:"-"` +type LoadBalancerUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerUpdateResponseMessageJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerUpdateResponseMessage] -type zoneLoadBalancerUpdateResponseMessageJSON struct { +// loadBalancerUpdateResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerUpdateResponseMessage] +type loadBalancerUpdateResponseMessageJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerUpdateResponseResult struct { +type LoadBalancerUpdateResponseResult struct { ID string `json:"id"` // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active @@ -2216,7 +2224,7 @@ type ZoneLoadBalancerUpdateResponseResult struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerUpdateResponseResultAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerUpdateResponseResultAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -2234,8 +2242,8 @@ type ZoneLoadBalancerUpdateResponseResult struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerUpdateResponseResultLocationStrategy `json:"location_strategy"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` + LocationStrategy LoadBalancerUpdateResponseResultLocationStrategy `json:"location_strategy"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The DNS hostname to associate with your Load Balancer. If this hostname already // exists as a DNS record in Cloudflare's DNS, the Load Balancer will take // precedence and the DNS record will not be used. @@ -2255,14 +2263,14 @@ type ZoneLoadBalancerUpdateResponseResult struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerUpdateResponseResultRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerUpdateResponseResultRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools interface{} `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules []ZoneLoadBalancerUpdateResponseResultRule `json:"rules"` + Rules []LoadBalancerUpdateResponseResultRule `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -2286,9 +2294,9 @@ type ZoneLoadBalancerUpdateResponseResult struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerUpdateResponseResultSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerUpdateResponseResultSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerUpdateResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -2322,16 +2330,16 @@ type ZoneLoadBalancerUpdateResponseResult struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerUpdateResponseResultSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerUpdateResponseResultSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerUpdateResponseResultJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerUpdateResponseResultJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerUpdateResponseResult] -type zoneLoadBalancerUpdateResponseResultJSON struct { +// loadBalancerUpdateResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerUpdateResponseResult] +type loadBalancerUpdateResponseResultJSON struct { ID apijson.Field AdaptiveRouting apijson.Field CountryPools apijson.Field @@ -2357,7 +2365,7 @@ type zoneLoadBalancerUpdateResponseResultJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -2367,39 +2375,39 @@ func (r *ZoneLoadBalancerUpdateResponseResult) UnmarshalJSON(data []byte) (err e // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerUpdateResponseResultAdaptiveRouting struct { +type LoadBalancerUpdateResponseResultAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerUpdateResponseResultAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerUpdateResponseResultAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultAdaptiveRoutingJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerUpdateResponseResultAdaptiveRouting] -type zoneLoadBalancerUpdateResponseResultAdaptiveRoutingJSON struct { +// loadBalancerUpdateResponseResultAdaptiveRoutingJSON contains the JSON metadata +// for the struct [LoadBalancerUpdateResponseResultAdaptiveRouting] +type loadBalancerUpdateResponseResultAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerUpdateResponseResultLocationStrategy struct { +type LoadBalancerUpdateResponseResultLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerUpdateResponseResultLocationStrategyMode `json:"mode"` + Mode LoadBalancerUpdateResponseResultLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -2407,20 +2415,20 @@ type ZoneLoadBalancerUpdateResponseResultLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerUpdateResponseResultLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerUpdateResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerUpdateResponseResultLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultLocationStrategyJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerUpdateResponseResultLocationStrategy] -type zoneLoadBalancerUpdateResponseResultLocationStrategyJSON struct { +// loadBalancerUpdateResponseResultLocationStrategyJSON contains the JSON metadata +// for the struct [LoadBalancerUpdateResponseResultLocationStrategy] +type loadBalancerUpdateResponseResultLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -2430,11 +2438,11 @@ func (r *ZoneLoadBalancerUpdateResponseResultLocationStrategy) UnmarshalJSON(dat // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerUpdateResponseResultLocationStrategyMode string +type LoadBalancerUpdateResponseResultLocationStrategyMode string const ( - ZoneLoadBalancerUpdateResponseResultLocationStrategyModePop ZoneLoadBalancerUpdateResponseResultLocationStrategyMode = "pop" - ZoneLoadBalancerUpdateResponseResultLocationStrategyModeResolverIP ZoneLoadBalancerUpdateResponseResultLocationStrategyMode = "resolver_ip" + LoadBalancerUpdateResponseResultLocationStrategyModePop LoadBalancerUpdateResponseResultLocationStrategyMode = "pop" + LoadBalancerUpdateResponseResultLocationStrategyModeResolverIP LoadBalancerUpdateResponseResultLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -2444,13 +2452,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs string +type LoadBalancerUpdateResponseResultLocationStrategyPreferEcs string const ( - ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcsAlways ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "always" - ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcsNever ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "never" - ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcsProximity ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcsGeo ZoneLoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "geo" + LoadBalancerUpdateResponseResultLocationStrategyPreferEcsAlways LoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "always" + LoadBalancerUpdateResponseResultLocationStrategyPreferEcsNever LoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "never" + LoadBalancerUpdateResponseResultLocationStrategyPreferEcsProximity LoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "proximity" + LoadBalancerUpdateResponseResultLocationStrategyPreferEcsGeo LoadBalancerUpdateResponseResultLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -2461,32 +2469,32 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerUpdateResponseResultRandomSteering struct { +type LoadBalancerUpdateResponseResultRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerUpdateResponseResultRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerUpdateResponseResultRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRandomSteeringJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerUpdateResponseResultRandomSteering] -type zoneLoadBalancerUpdateResponseResultRandomSteeringJSON struct { +// loadBalancerUpdateResponseResultRandomSteeringJSON contains the JSON metadata +// for the struct [LoadBalancerUpdateResponseResultRandomSteering] +type loadBalancerUpdateResponseResultRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerUpdateResponseResultRule struct { +type LoadBalancerUpdateResponseResultRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -2498,12 +2506,12 @@ type ZoneLoadBalancerUpdateResponseResultRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse ZoneLoadBalancerUpdateResponseResultRulesFixedResponse `json:"fixed_response"` + FixedResponse LoadBalancerUpdateResponseResultRulesFixedResponse `json:"fixed_response"` // Name of this rule. Only used for human readability. Name string `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides ZoneLoadBalancerUpdateResponseResultRulesOverrides `json:"overrides"` + Overrides LoadBalancerUpdateResponseResultRulesOverrides `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -2511,13 +2519,13 @@ type ZoneLoadBalancerUpdateResponseResultRule struct { Priority int64 `json:"priority"` // If this rule's condition is true, this causes rule evaluation to stop after // processing this rule. - Terminates bool `json:"terminates"` - JSON zoneLoadBalancerUpdateResponseResultRuleJSON `json:"-"` + Terminates bool `json:"terminates"` + JSON loadBalancerUpdateResponseResultRuleJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRuleJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerUpdateResponseResultRule] -type zoneLoadBalancerUpdateResponseResultRuleJSON struct { +// loadBalancerUpdateResponseResultRuleJSON contains the JSON metadata for the +// struct [LoadBalancerUpdateResponseResultRule] +type loadBalancerUpdateResponseResultRuleJSON struct { Condition apijson.Field Disabled apijson.Field FixedResponse apijson.Field @@ -2529,14 +2537,14 @@ type zoneLoadBalancerUpdateResponseResultRuleJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRule) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRule) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerUpdateResponseResultRulesFixedResponse struct { +type LoadBalancerUpdateResponseResultRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType string `json:"content_type"` // The http 'Location' header to include in the response. @@ -2544,13 +2552,13 @@ type ZoneLoadBalancerUpdateResponseResultRulesFixedResponse struct { // Text to include as the http body. MessageBody string `json:"message_body"` // The http status code to respond with. - StatusCode int64 `json:"status_code"` - JSON zoneLoadBalancerUpdateResponseResultRulesFixedResponseJSON `json:"-"` + StatusCode int64 `json:"status_code"` + JSON loadBalancerUpdateResponseResultRulesFixedResponseJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesFixedResponseJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerUpdateResponseResultRulesFixedResponse] -type zoneLoadBalancerUpdateResponseResultRulesFixedResponseJSON struct { +// loadBalancerUpdateResponseResultRulesFixedResponseJSON contains the JSON +// metadata for the struct [LoadBalancerUpdateResponseResultRulesFixedResponse] +type loadBalancerUpdateResponseResultRulesFixedResponseJSON struct { ContentType apijson.Field Location apijson.Field MessageBody apijson.Field @@ -2559,20 +2567,20 @@ type zoneLoadBalancerUpdateResponseResultRulesFixedResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerUpdateResponseResultRulesOverrides struct { +type LoadBalancerUpdateResponseResultRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -2585,7 +2593,7 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverrides struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` + LocationStrategy LoadBalancerUpdateResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -2599,7 +2607,7 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerUpdateResponseResultRulesOverridesRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -2627,9 +2635,9 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -2663,16 +2671,16 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerUpdateResponseResultRulesOverridesJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerUpdateResponseResultRulesOverridesJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesOverridesJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerUpdateResponseResultRulesOverrides] -type zoneLoadBalancerUpdateResponseResultRulesOverridesJSON struct { +// loadBalancerUpdateResponseResultRulesOverridesJSON contains the JSON metadata +// for the struct [LoadBalancerUpdateResponseResultRulesOverrides] +type loadBalancerUpdateResponseResultRulesOverridesJSON struct { AdaptiveRouting apijson.Field CountryPools apijson.Field DefaultPools apijson.Field @@ -2690,7 +2698,7 @@ type zoneLoadBalancerUpdateResponseResultRulesOverridesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -2700,40 +2708,40 @@ func (r *ZoneLoadBalancerUpdateResponseResultRulesOverrides) UnmarshalJSON(data // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting struct { +type LoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON contains -// the JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting] -type zoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON struct { +// loadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON contains the +// JSON metadata for the struct +// [LoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting] +type loadBalancerUpdateResponseResultRulesOverridesAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy struct { +type LoadBalancerUpdateResponseResultRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode `json:"mode"` + Mode LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -2741,21 +2749,21 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON contains -// the JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy] -type zoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON struct { +// loadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON contains the +// JSON metadata for the struct +// [LoadBalancerUpdateResponseResultRulesOverridesLocationStrategy] +type loadBalancerUpdateResponseResultRulesOverridesLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -2765,11 +2773,11 @@ func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategy) Unm // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode string +type LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyModePop ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyModePop LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode = "pop" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyModeResolverIP LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -2779,13 +2787,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsNever LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerUpdateResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -2796,27 +2804,27 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteering struct { +type LoadBalancerUpdateResponseResultRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON contains -// the JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteering] -type zoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON struct { +// loadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON contains the +// JSON metadata for the struct +// [LoadBalancerUpdateResponseResultRulesOverridesRandomSteering] +type loadBalancerUpdateResponseResultRulesOverridesRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -2843,18 +2851,18 @@ func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesRandomSteering) Unmar // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity string +type LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityNone ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityCookie ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityHeader ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityEmpty ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "\"\"" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityNone LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "none" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityCookie LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "cookie" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityIPCookie LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityHeader LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "header" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityEmpty LoadBalancerUpdateResponseResultRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -2881,12 +2889,12 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -2898,14 +2906,14 @@ type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON +// loadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON // contains the JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes] -type zoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON struct { +// [LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes] +type loadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -2916,32 +2924,32 @@ type zoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -2955,12 +2963,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerUpdateResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -2985,17 +2993,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy string +type LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyOff ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyGeo ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyRandom ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyProximity ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyOff LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "off" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyGeo LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "geo" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyRandom LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "random" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyDynamicLatency LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyProximity LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "proximity" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyLeastConnections LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicyEmpty LoadBalancerUpdateResponseResultRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -3021,18 +3029,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerUpdateResponseResultSessionAffinity string +type LoadBalancerUpdateResponseResultSessionAffinity string const ( - ZoneLoadBalancerUpdateResponseResultSessionAffinityNone ZoneLoadBalancerUpdateResponseResultSessionAffinity = "none" - ZoneLoadBalancerUpdateResponseResultSessionAffinityCookie ZoneLoadBalancerUpdateResponseResultSessionAffinity = "cookie" - ZoneLoadBalancerUpdateResponseResultSessionAffinityIPCookie ZoneLoadBalancerUpdateResponseResultSessionAffinity = "ip_cookie" - ZoneLoadBalancerUpdateResponseResultSessionAffinityHeader ZoneLoadBalancerUpdateResponseResultSessionAffinity = "header" - ZoneLoadBalancerUpdateResponseResultSessionAffinityEmpty ZoneLoadBalancerUpdateResponseResultSessionAffinity = "\"\"" + LoadBalancerUpdateResponseResultSessionAffinityNone LoadBalancerUpdateResponseResultSessionAffinity = "none" + LoadBalancerUpdateResponseResultSessionAffinityCookie LoadBalancerUpdateResponseResultSessionAffinity = "cookie" + LoadBalancerUpdateResponseResultSessionAffinityIPCookie LoadBalancerUpdateResponseResultSessionAffinity = "ip_cookie" + LoadBalancerUpdateResponseResultSessionAffinityHeader LoadBalancerUpdateResponseResultSessionAffinity = "header" + LoadBalancerUpdateResponseResultSessionAffinityEmpty LoadBalancerUpdateResponseResultSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes struct { +type LoadBalancerUpdateResponseResultSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -3059,12 +3067,12 @@ type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerUpdateResponseResultSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -3076,14 +3084,14 @@ type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerUpdateResponseResultSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerUpdateResponseResultSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerUpdateResponseResultSessionAffinityAttributesJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes] -type zoneLoadBalancerUpdateResponseResultSessionAffinityAttributesJSON struct { +// loadBalancerUpdateResponseResultSessionAffinityAttributesJSON contains the JSON +// metadata for the struct +// [LoadBalancerUpdateResponseResultSessionAffinityAttributes] +type loadBalancerUpdateResponseResultSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -3094,32 +3102,32 @@ type zoneLoadBalancerUpdateResponseResultSessionAffinityAttributesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerUpdateResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite string +type LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteLax ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteNone ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Strict" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteAuto LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Auto" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteLax LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Lax" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteNone LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "None" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesiteStrict LoadBalancerUpdateResponseResultSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecure string +type LoadBalancerUpdateResponseResultSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecureAuto ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecureAlways ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecureNever ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Never" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSecureAuto LoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Auto" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSecureAlways LoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Always" + LoadBalancerUpdateResponseResultSessionAffinityAttributesSecureNever LoadBalancerUpdateResponseResultSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -3133,12 +3141,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerUpdateResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -3163,39 +3171,39 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerUpdateResponseResultSteeringPolicy string +type LoadBalancerUpdateResponseResultSteeringPolicy string const ( - ZoneLoadBalancerUpdateResponseResultSteeringPolicyOff ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "off" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyGeo ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "geo" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyRandom ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "random" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyDynamicLatency ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyProximity ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "proximity" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyLeastConnections ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "least_connections" - ZoneLoadBalancerUpdateResponseResultSteeringPolicyEmpty ZoneLoadBalancerUpdateResponseResultSteeringPolicy = "\"\"" + LoadBalancerUpdateResponseResultSteeringPolicyOff LoadBalancerUpdateResponseResultSteeringPolicy = "off" + LoadBalancerUpdateResponseResultSteeringPolicyGeo LoadBalancerUpdateResponseResultSteeringPolicy = "geo" + LoadBalancerUpdateResponseResultSteeringPolicyRandom LoadBalancerUpdateResponseResultSteeringPolicy = "random" + LoadBalancerUpdateResponseResultSteeringPolicyDynamicLatency LoadBalancerUpdateResponseResultSteeringPolicy = "dynamic_latency" + LoadBalancerUpdateResponseResultSteeringPolicyProximity LoadBalancerUpdateResponseResultSteeringPolicy = "proximity" + LoadBalancerUpdateResponseResultSteeringPolicyLeastOutstandingRequests LoadBalancerUpdateResponseResultSteeringPolicy = "least_outstanding_requests" + LoadBalancerUpdateResponseResultSteeringPolicyLeastConnections LoadBalancerUpdateResponseResultSteeringPolicy = "least_connections" + LoadBalancerUpdateResponseResultSteeringPolicyEmpty LoadBalancerUpdateResponseResultSteeringPolicy = "\"\"" ) // Whether the API call was successful -type ZoneLoadBalancerUpdateResponseSuccess bool +type LoadBalancerUpdateResponseSuccess bool const ( - ZoneLoadBalancerUpdateResponseSuccessTrue ZoneLoadBalancerUpdateResponseSuccess = true + LoadBalancerUpdateResponseSuccessTrue LoadBalancerUpdateResponseSuccess = true ) -type ZoneLoadBalancerListResponse struct { - Errors []ZoneLoadBalancerListResponseError `json:"errors"` - Messages []ZoneLoadBalancerListResponseMessage `json:"messages"` - Result []ZoneLoadBalancerListResponseResult `json:"result"` - ResultInfo ZoneLoadBalancerListResponseResultInfo `json:"result_info"` +type LoadBalancerListResponse struct { + Errors []LoadBalancerListResponseError `json:"errors"` + Messages []LoadBalancerListResponseMessage `json:"messages"` + Result []LoadBalancerListResponseResult `json:"result"` + ResultInfo LoadBalancerListResponseResultInfo `json:"result_info"` // Whether the API call was successful - Success ZoneLoadBalancerListResponseSuccess `json:"success"` - JSON zoneLoadBalancerListResponseJSON `json:"-"` + Success LoadBalancerListResponseSuccess `json:"success"` + JSON loadBalancerListResponseJSON `json:"-"` } -// zoneLoadBalancerListResponseJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerListResponse] -type zoneLoadBalancerListResponseJSON struct { +// loadBalancerListResponseJSON contains the JSON metadata for the struct +// [LoadBalancerListResponse] +type loadBalancerListResponseJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -3205,49 +3213,49 @@ type zoneLoadBalancerListResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerListResponseErrorJSON `json:"-"` +type LoadBalancerListResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerListResponseErrorJSON `json:"-"` } -// zoneLoadBalancerListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerListResponseError] -type zoneLoadBalancerListResponseErrorJSON struct { +// loadBalancerListResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerListResponseError] +type loadBalancerListResponseErrorJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseError) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseError) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerListResponseMessageJSON `json:"-"` +type LoadBalancerListResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerListResponseMessageJSON `json:"-"` } -// zoneLoadBalancerListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerListResponseMessage] -type zoneLoadBalancerListResponseMessageJSON struct { +// loadBalancerListResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerListResponseMessage] +type loadBalancerListResponseMessageJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseMessage) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseMessage) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerListResponseResult struct { +type LoadBalancerListResponseResult struct { ID string `json:"id"` // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active @@ -3255,7 +3263,7 @@ type ZoneLoadBalancerListResponseResult struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerListResponseResultAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerListResponseResultAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -3273,8 +3281,8 @@ type ZoneLoadBalancerListResponseResult struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerListResponseResultLocationStrategy `json:"location_strategy"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` + LocationStrategy LoadBalancerListResponseResultLocationStrategy `json:"location_strategy"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The DNS hostname to associate with your Load Balancer. If this hostname already // exists as a DNS record in Cloudflare's DNS, the Load Balancer will take // precedence and the DNS record will not be used. @@ -3294,14 +3302,14 @@ type ZoneLoadBalancerListResponseResult struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerListResponseResultRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerListResponseResultRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools interface{} `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules []ZoneLoadBalancerListResponseResultRule `json:"rules"` + Rules []LoadBalancerListResponseResultRule `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -3325,9 +3333,9 @@ type ZoneLoadBalancerListResponseResult struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerListResponseResultSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerListResponseResultSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerListResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerListResponseResultSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -3361,16 +3369,16 @@ type ZoneLoadBalancerListResponseResult struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerListResponseResultSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerListResponseResultSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerListResponseResultJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerListResponseResultJSON `json:"-"` } -// zoneLoadBalancerListResponseResultJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerListResponseResult] -type zoneLoadBalancerListResponseResultJSON struct { +// loadBalancerListResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerListResponseResult] +type loadBalancerListResponseResultJSON struct { ID apijson.Field AdaptiveRouting apijson.Field CountryPools apijson.Field @@ -3396,7 +3404,7 @@ type zoneLoadBalancerListResponseResultJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResult) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResult) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -3406,39 +3414,39 @@ func (r *ZoneLoadBalancerListResponseResult) UnmarshalJSON(data []byte) (err err // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerListResponseResultAdaptiveRouting struct { +type LoadBalancerListResponseResultAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerListResponseResultAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerListResponseResultAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerListResponseResultAdaptiveRoutingJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerListResponseResultAdaptiveRouting] -type zoneLoadBalancerListResponseResultAdaptiveRoutingJSON struct { +// loadBalancerListResponseResultAdaptiveRoutingJSON contains the JSON metadata for +// the struct [LoadBalancerListResponseResultAdaptiveRouting] +type loadBalancerListResponseResultAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerListResponseResultLocationStrategy struct { +type LoadBalancerListResponseResultLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerListResponseResultLocationStrategyMode `json:"mode"` + Mode LoadBalancerListResponseResultLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -3446,20 +3454,20 @@ type ZoneLoadBalancerListResponseResultLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerListResponseResultLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerListResponseResultLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerListResponseResultLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerListResponseResultLocationStrategyJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerListResponseResultLocationStrategy] -type zoneLoadBalancerListResponseResultLocationStrategyJSON struct { +// loadBalancerListResponseResultLocationStrategyJSON contains the JSON metadata +// for the struct [LoadBalancerListResponseResultLocationStrategy] +type loadBalancerListResponseResultLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -3469,11 +3477,11 @@ func (r *ZoneLoadBalancerListResponseResultLocationStrategy) UnmarshalJSON(data // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerListResponseResultLocationStrategyMode string +type LoadBalancerListResponseResultLocationStrategyMode string const ( - ZoneLoadBalancerListResponseResultLocationStrategyModePop ZoneLoadBalancerListResponseResultLocationStrategyMode = "pop" - ZoneLoadBalancerListResponseResultLocationStrategyModeResolverIP ZoneLoadBalancerListResponseResultLocationStrategyMode = "resolver_ip" + LoadBalancerListResponseResultLocationStrategyModePop LoadBalancerListResponseResultLocationStrategyMode = "pop" + LoadBalancerListResponseResultLocationStrategyModeResolverIP LoadBalancerListResponseResultLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -3483,13 +3491,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs string +type LoadBalancerListResponseResultLocationStrategyPreferEcs string const ( - ZoneLoadBalancerListResponseResultLocationStrategyPreferEcsAlways ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs = "always" - ZoneLoadBalancerListResponseResultLocationStrategyPreferEcsNever ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs = "never" - ZoneLoadBalancerListResponseResultLocationStrategyPreferEcsProximity ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerListResponseResultLocationStrategyPreferEcsGeo ZoneLoadBalancerListResponseResultLocationStrategyPreferEcs = "geo" + LoadBalancerListResponseResultLocationStrategyPreferEcsAlways LoadBalancerListResponseResultLocationStrategyPreferEcs = "always" + LoadBalancerListResponseResultLocationStrategyPreferEcsNever LoadBalancerListResponseResultLocationStrategyPreferEcs = "never" + LoadBalancerListResponseResultLocationStrategyPreferEcsProximity LoadBalancerListResponseResultLocationStrategyPreferEcs = "proximity" + LoadBalancerListResponseResultLocationStrategyPreferEcsGeo LoadBalancerListResponseResultLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -3500,32 +3508,32 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerListResponseResultRandomSteering struct { +type LoadBalancerListResponseResultRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerListResponseResultRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerListResponseResultRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRandomSteeringJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerListResponseResultRandomSteering] -type zoneLoadBalancerListResponseResultRandomSteeringJSON struct { +// loadBalancerListResponseResultRandomSteeringJSON contains the JSON metadata for +// the struct [LoadBalancerListResponseResultRandomSteering] +type loadBalancerListResponseResultRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerListResponseResultRule struct { +type LoadBalancerListResponseResultRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -3537,12 +3545,12 @@ type ZoneLoadBalancerListResponseResultRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse ZoneLoadBalancerListResponseResultRulesFixedResponse `json:"fixed_response"` + FixedResponse LoadBalancerListResponseResultRulesFixedResponse `json:"fixed_response"` // Name of this rule. Only used for human readability. Name string `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides ZoneLoadBalancerListResponseResultRulesOverrides `json:"overrides"` + Overrides LoadBalancerListResponseResultRulesOverrides `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -3550,13 +3558,13 @@ type ZoneLoadBalancerListResponseResultRule struct { Priority int64 `json:"priority"` // If this rule's condition is true, this causes rule evaluation to stop after // processing this rule. - Terminates bool `json:"terminates"` - JSON zoneLoadBalancerListResponseResultRuleJSON `json:"-"` + Terminates bool `json:"terminates"` + JSON loadBalancerListResponseResultRuleJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRuleJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerListResponseResultRule] -type zoneLoadBalancerListResponseResultRuleJSON struct { +// loadBalancerListResponseResultRuleJSON contains the JSON metadata for the struct +// [LoadBalancerListResponseResultRule] +type loadBalancerListResponseResultRuleJSON struct { Condition apijson.Field Disabled apijson.Field FixedResponse apijson.Field @@ -3568,14 +3576,14 @@ type zoneLoadBalancerListResponseResultRuleJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRule) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRule) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerListResponseResultRulesFixedResponse struct { +type LoadBalancerListResponseResultRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType string `json:"content_type"` // The http 'Location' header to include in the response. @@ -3583,13 +3591,13 @@ type ZoneLoadBalancerListResponseResultRulesFixedResponse struct { // Text to include as the http body. MessageBody string `json:"message_body"` // The http status code to respond with. - StatusCode int64 `json:"status_code"` - JSON zoneLoadBalancerListResponseResultRulesFixedResponseJSON `json:"-"` + StatusCode int64 `json:"status_code"` + JSON loadBalancerListResponseResultRulesFixedResponseJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesFixedResponseJSON contains the JSON -// metadata for the struct [ZoneLoadBalancerListResponseResultRulesFixedResponse] -type zoneLoadBalancerListResponseResultRulesFixedResponseJSON struct { +// loadBalancerListResponseResultRulesFixedResponseJSON contains the JSON metadata +// for the struct [LoadBalancerListResponseResultRulesFixedResponse] +type loadBalancerListResponseResultRulesFixedResponseJSON struct { ContentType apijson.Field Location apijson.Field MessageBody apijson.Field @@ -3598,20 +3606,20 @@ type zoneLoadBalancerListResponseResultRulesFixedResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesFixedResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerListResponseResultRulesOverrides struct { +type LoadBalancerListResponseResultRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting ZoneLoadBalancerListResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` + AdaptiveRouting LoadBalancerListResponseResultRulesOverridesAdaptiveRouting `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -3624,7 +3632,7 @@ type ZoneLoadBalancerListResponseResultRulesOverrides struct { FallbackPool interface{} `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` + LocationStrategy LoadBalancerListResponseResultRulesOverridesLocationStrategy `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -3638,7 +3646,7 @@ type ZoneLoadBalancerListResponseResultRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering ZoneLoadBalancerListResponseResultRulesOverridesRandomSteering `json:"random_steering"` + RandomSteering LoadBalancerListResponseResultRulesOverridesRandomSteering `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -3666,9 +3674,9 @@ type ZoneLoadBalancerListResponseResultRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` + SessionAffinity LoadBalancerListResponseResultRulesOverridesSessionAffinity `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` + SessionAffinityAttributes LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -3702,16 +3710,16 @@ type ZoneLoadBalancerListResponseResultRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` + SteeringPolicy LoadBalancerListResponseResultRulesOverridesSteeringPolicy `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. - TTL float64 `json:"ttl"` - JSON zoneLoadBalancerListResponseResultRulesOverridesJSON `json:"-"` + TTL float64 `json:"ttl"` + JSON loadBalancerListResponseResultRulesOverridesJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesOverridesJSON contains the JSON metadata -// for the struct [ZoneLoadBalancerListResponseResultRulesOverrides] -type zoneLoadBalancerListResponseResultRulesOverridesJSON struct { +// loadBalancerListResponseResultRulesOverridesJSON contains the JSON metadata for +// the struct [LoadBalancerListResponseResultRulesOverrides] +type loadBalancerListResponseResultRulesOverridesJSON struct { AdaptiveRouting apijson.Field CountryPools apijson.Field DefaultPools apijson.Field @@ -3729,7 +3737,7 @@ type zoneLoadBalancerListResponseResultRulesOverridesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesOverrides) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -3739,40 +3747,40 @@ func (r *ZoneLoadBalancerListResponseResultRulesOverrides) UnmarshalJSON(data [] // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerListResponseResultRulesOverridesAdaptiveRouting struct { +type LoadBalancerListResponseResultRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the // default) zero-downtime failover will only occur between origins within the same // pool. See `session_affinity_attributes` for control over when sessions are // broken or reassigned. - FailoverAcrossPools bool `json:"failover_across_pools"` - JSON zoneLoadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` + FailoverAcrossPools bool `json:"failover_across_pools"` + JSON loadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON contains the +// loadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON contains the // JSON metadata for the struct -// [ZoneLoadBalancerListResponseResultRulesOverridesAdaptiveRouting] -type zoneLoadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON struct { +// [LoadBalancerListResponseResultRulesOverridesAdaptiveRouting] +type loadBalancerListResponseResultRulesOverridesAdaptiveRoutingJSON struct { FailoverAcrossPools apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesOverridesAdaptiveRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy struct { +type LoadBalancerListResponseResultRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyMode `json:"mode"` + Mode LoadBalancerListResponseResultRulesOverridesLocationStrategyMode `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -3780,21 +3788,21 @@ type ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` - JSON zoneLoadBalancerListResponseResultRulesOverridesLocationStrategyJSON `json:"-"` + PreferEcs LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs `json:"prefer_ecs"` + JSON loadBalancerListResponseResultRulesOverridesLocationStrategyJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesOverridesLocationStrategyJSON contains -// the JSON metadata for the struct -// [ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy] -type zoneLoadBalancerListResponseResultRulesOverridesLocationStrategyJSON struct { +// loadBalancerListResponseResultRulesOverridesLocationStrategyJSON contains the +// JSON metadata for the struct +// [LoadBalancerListResponseResultRulesOverridesLocationStrategy] +type loadBalancerListResponseResultRulesOverridesLocationStrategyJSON struct { Mode apijson.Field PreferEcs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesOverridesLocationStrategy) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -3804,11 +3812,11 @@ func (r *ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategy) Unmar // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyMode string +type LoadBalancerListResponseResultRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyModePop ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerListResponseResultRulesOverridesLocationStrategyModePop LoadBalancerListResponseResultRulesOverridesLocationStrategyMode = "pop" + LoadBalancerListResponseResultRulesOverridesLocationStrategyModeResolverIP LoadBalancerListResponseResultRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -3818,13 +3826,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsNever LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerListResponseResultRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -3835,27 +3843,27 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerListResponseResultRulesOverridesRandomSteering struct { +type LoadBalancerListResponseResultRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight float64 `json:"default_weight"` // A mapping of pool IDs to custom weights. The weight is relative to other pools // in the load balancer. - PoolWeights interface{} `json:"pool_weights"` - JSON zoneLoadBalancerListResponseResultRulesOverridesRandomSteeringJSON `json:"-"` + PoolWeights interface{} `json:"pool_weights"` + JSON loadBalancerListResponseResultRulesOverridesRandomSteeringJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesOverridesRandomSteeringJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerListResponseResultRulesOverridesRandomSteering] -type zoneLoadBalancerListResponseResultRulesOverridesRandomSteeringJSON struct { +// loadBalancerListResponseResultRulesOverridesRandomSteeringJSON contains the JSON +// metadata for the struct +// [LoadBalancerListResponseResultRulesOverridesRandomSteering] +type loadBalancerListResponseResultRulesOverridesRandomSteeringJSON struct { DefaultWeight apijson.Field PoolWeights apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesOverridesRandomSteering) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } @@ -3882,18 +3890,18 @@ func (r *ZoneLoadBalancerListResponseResultRulesOverridesRandomSteering) Unmarsh // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity string +type LoadBalancerListResponseResultRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityNone ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityCookie ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityHeader ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityEmpty ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinity = "\"\"" + LoadBalancerListResponseResultRulesOverridesSessionAffinityNone LoadBalancerListResponseResultRulesOverridesSessionAffinity = "none" + LoadBalancerListResponseResultRulesOverridesSessionAffinityCookie LoadBalancerListResponseResultRulesOverridesSessionAffinity = "cookie" + LoadBalancerListResponseResultRulesOverridesSessionAffinityIPCookie LoadBalancerListResponseResultRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerListResponseResultRulesOverridesSessionAffinityHeader LoadBalancerListResponseResultRulesOverridesSessionAffinity = "header" + LoadBalancerListResponseResultRulesOverridesSessionAffinityEmpty LoadBalancerListResponseResultRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -3920,12 +3928,12 @@ type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes s // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -3937,14 +3945,14 @@ type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes s // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON +// loadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON // contains the JSON metadata for the struct -// [ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes] -type zoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON struct { +// [LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes] +type loadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -3955,32 +3963,32 @@ type zoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesJS ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -3994,12 +4002,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerListResponseResultRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -4024,17 +4032,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy string +type LoadBalancerListResponseResultRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyOff ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyGeo ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyRandom ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyProximity ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerListResponseResultRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyOff LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "off" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyGeo LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "geo" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyRandom LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "random" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyDynamicLatency LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyProximity LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "proximity" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyLeastConnections LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerListResponseResultRulesOverridesSteeringPolicyEmpty LoadBalancerListResponseResultRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -4060,18 +4068,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerListResponseResultSessionAffinity string +type LoadBalancerListResponseResultSessionAffinity string const ( - ZoneLoadBalancerListResponseResultSessionAffinityNone ZoneLoadBalancerListResponseResultSessionAffinity = "none" - ZoneLoadBalancerListResponseResultSessionAffinityCookie ZoneLoadBalancerListResponseResultSessionAffinity = "cookie" - ZoneLoadBalancerListResponseResultSessionAffinityIPCookie ZoneLoadBalancerListResponseResultSessionAffinity = "ip_cookie" - ZoneLoadBalancerListResponseResultSessionAffinityHeader ZoneLoadBalancerListResponseResultSessionAffinity = "header" - ZoneLoadBalancerListResponseResultSessionAffinityEmpty ZoneLoadBalancerListResponseResultSessionAffinity = "\"\"" + LoadBalancerListResponseResultSessionAffinityNone LoadBalancerListResponseResultSessionAffinity = "none" + LoadBalancerListResponseResultSessionAffinityCookie LoadBalancerListResponseResultSessionAffinity = "cookie" + LoadBalancerListResponseResultSessionAffinityIPCookie LoadBalancerListResponseResultSessionAffinity = "ip_cookie" + LoadBalancerListResponseResultSessionAffinityHeader LoadBalancerListResponseResultSessionAffinity = "header" + LoadBalancerListResponseResultSessionAffinityEmpty LoadBalancerListResponseResultSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerListResponseResultSessionAffinityAttributes struct { +type LoadBalancerListResponseResultSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration float64 `json:"drain_duration"` @@ -4098,12 +4106,12 @@ type ZoneLoadBalancerListResponseResultSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite `json:"samesite"` + Samesite LoadBalancerListResponseResultSessionAffinityAttributesSamesite `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecure `json:"secure"` + Secure LoadBalancerListResponseResultSessionAffinityAttributesSecure `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -4115,14 +4123,14 @@ type ZoneLoadBalancerListResponseResultSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` - JSON zoneLoadBalancerListResponseResultSessionAffinityAttributesJSON `json:"-"` + ZeroDowntimeFailover LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover `json:"zero_downtime_failover"` + JSON loadBalancerListResponseResultSessionAffinityAttributesJSON `json:"-"` } -// zoneLoadBalancerListResponseResultSessionAffinityAttributesJSON contains the -// JSON metadata for the struct -// [ZoneLoadBalancerListResponseResultSessionAffinityAttributes] -type zoneLoadBalancerListResponseResultSessionAffinityAttributesJSON struct { +// loadBalancerListResponseResultSessionAffinityAttributesJSON contains the JSON +// metadata for the struct +// [LoadBalancerListResponseResultSessionAffinityAttributes] +type loadBalancerListResponseResultSessionAffinityAttributesJSON struct { DrainDuration apijson.Field Headers apijson.Field RequireAllHeaders apijson.Field @@ -4133,32 +4141,32 @@ type zoneLoadBalancerListResponseResultSessionAffinityAttributesJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultSessionAffinityAttributes) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite string +type LoadBalancerListResponseResultSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesiteLax ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesiteNone ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Strict" + LoadBalancerListResponseResultSessionAffinityAttributesSamesiteAuto LoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Auto" + LoadBalancerListResponseResultSessionAffinityAttributesSamesiteLax LoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Lax" + LoadBalancerListResponseResultSessionAffinityAttributesSamesiteNone LoadBalancerListResponseResultSessionAffinityAttributesSamesite = "None" + LoadBalancerListResponseResultSessionAffinityAttributesSamesiteStrict LoadBalancerListResponseResultSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecure string +type LoadBalancerListResponseResultSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecureAuto ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecureAlways ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecureNever ZoneLoadBalancerListResponseResultSessionAffinityAttributesSecure = "Never" + LoadBalancerListResponseResultSessionAffinityAttributesSecureAuto LoadBalancerListResponseResultSessionAffinityAttributesSecure = "Auto" + LoadBalancerListResponseResultSessionAffinityAttributesSecureAlways LoadBalancerListResponseResultSessionAffinityAttributesSecure = "Always" + LoadBalancerListResponseResultSessionAffinityAttributesSecureNever LoadBalancerListResponseResultSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -4172,12 +4180,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerListResponseResultSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -4202,20 +4210,20 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerListResponseResultSteeringPolicy string +type LoadBalancerListResponseResultSteeringPolicy string const ( - ZoneLoadBalancerListResponseResultSteeringPolicyOff ZoneLoadBalancerListResponseResultSteeringPolicy = "off" - ZoneLoadBalancerListResponseResultSteeringPolicyGeo ZoneLoadBalancerListResponseResultSteeringPolicy = "geo" - ZoneLoadBalancerListResponseResultSteeringPolicyRandom ZoneLoadBalancerListResponseResultSteeringPolicy = "random" - ZoneLoadBalancerListResponseResultSteeringPolicyDynamicLatency ZoneLoadBalancerListResponseResultSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerListResponseResultSteeringPolicyProximity ZoneLoadBalancerListResponseResultSteeringPolicy = "proximity" - ZoneLoadBalancerListResponseResultSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerListResponseResultSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerListResponseResultSteeringPolicyLeastConnections ZoneLoadBalancerListResponseResultSteeringPolicy = "least_connections" - ZoneLoadBalancerListResponseResultSteeringPolicyEmpty ZoneLoadBalancerListResponseResultSteeringPolicy = "\"\"" + LoadBalancerListResponseResultSteeringPolicyOff LoadBalancerListResponseResultSteeringPolicy = "off" + LoadBalancerListResponseResultSteeringPolicyGeo LoadBalancerListResponseResultSteeringPolicy = "geo" + LoadBalancerListResponseResultSteeringPolicyRandom LoadBalancerListResponseResultSteeringPolicy = "random" + LoadBalancerListResponseResultSteeringPolicyDynamicLatency LoadBalancerListResponseResultSteeringPolicy = "dynamic_latency" + LoadBalancerListResponseResultSteeringPolicyProximity LoadBalancerListResponseResultSteeringPolicy = "proximity" + LoadBalancerListResponseResultSteeringPolicyLeastOutstandingRequests LoadBalancerListResponseResultSteeringPolicy = "least_outstanding_requests" + LoadBalancerListResponseResultSteeringPolicyLeastConnections LoadBalancerListResponseResultSteeringPolicy = "least_connections" + LoadBalancerListResponseResultSteeringPolicyEmpty LoadBalancerListResponseResultSteeringPolicy = "\"\"" ) -type ZoneLoadBalancerListResponseResultInfo struct { +type LoadBalancerListResponseResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results @@ -4223,13 +4231,13 @@ type ZoneLoadBalancerListResponseResultInfo struct { // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters - TotalCount float64 `json:"total_count"` - JSON zoneLoadBalancerListResponseResultInfoJSON `json:"-"` + TotalCount float64 `json:"total_count"` + JSON loadBalancerListResponseResultInfoJSON `json:"-"` } -// zoneLoadBalancerListResponseResultInfoJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerListResponseResultInfo] -type zoneLoadBalancerListResponseResultInfoJSON struct { +// loadBalancerListResponseResultInfoJSON contains the JSON metadata for the struct +// [LoadBalancerListResponseResultInfo] +type loadBalancerListResponseResultInfoJSON struct { Count apijson.Field Page apijson.Field PerPage apijson.Field @@ -4238,29 +4246,29 @@ type zoneLoadBalancerListResponseResultInfoJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Whether the API call was successful -type ZoneLoadBalancerListResponseSuccess bool +type LoadBalancerListResponseSuccess bool const ( - ZoneLoadBalancerListResponseSuccessTrue ZoneLoadBalancerListResponseSuccess = true + LoadBalancerListResponseSuccessTrue LoadBalancerListResponseSuccess = true ) -type ZoneLoadBalancerDeleteResponse struct { - Errors []ZoneLoadBalancerDeleteResponseError `json:"errors"` - Messages []ZoneLoadBalancerDeleteResponseMessage `json:"messages"` - Result ZoneLoadBalancerDeleteResponseResult `json:"result"` +type LoadBalancerDeleteResponse struct { + Errors []LoadBalancerDeleteResponseError `json:"errors"` + Messages []LoadBalancerDeleteResponseMessage `json:"messages"` + Result LoadBalancerDeleteResponseResult `json:"result"` // Whether the API call was successful - Success ZoneLoadBalancerDeleteResponseSuccess `json:"success"` - JSON zoneLoadBalancerDeleteResponseJSON `json:"-"` + Success LoadBalancerDeleteResponseSuccess `json:"success"` + JSON loadBalancerDeleteResponseJSON `json:"-"` } -// zoneLoadBalancerDeleteResponseJSON contains the JSON metadata for the struct -// [ZoneLoadBalancerDeleteResponse] -type zoneLoadBalancerDeleteResponseJSON struct { +// loadBalancerDeleteResponseJSON contains the JSON metadata for the struct +// [LoadBalancerDeleteResponse] +type loadBalancerDeleteResponseJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -4269,73 +4277,73 @@ type zoneLoadBalancerDeleteResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerDeleteResponse) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerDeleteResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerDeleteResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerDeleteResponseErrorJSON `json:"-"` +type LoadBalancerDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerDeleteResponseErrorJSON `json:"-"` } -// zoneLoadBalancerDeleteResponseErrorJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerDeleteResponseError] -type zoneLoadBalancerDeleteResponseErrorJSON struct { +// loadBalancerDeleteResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerDeleteResponseError] +type loadBalancerDeleteResponseErrorJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerDeleteResponseError) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerDeleteResponseError) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerDeleteResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneLoadBalancerDeleteResponseMessageJSON `json:"-"` +type LoadBalancerDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerDeleteResponseMessageJSON `json:"-"` } -// zoneLoadBalancerDeleteResponseMessageJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerDeleteResponseMessage] -type zoneLoadBalancerDeleteResponseMessageJSON struct { +// loadBalancerDeleteResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerDeleteResponseMessage] +type loadBalancerDeleteResponseMessageJSON struct { Code apijson.Field Message apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -type ZoneLoadBalancerDeleteResponseResult struct { - ID string `json:"id"` - JSON zoneLoadBalancerDeleteResponseResultJSON `json:"-"` +type LoadBalancerDeleteResponseResult struct { + ID string `json:"id"` + JSON loadBalancerDeleteResponseResultJSON `json:"-"` } -// zoneLoadBalancerDeleteResponseResultJSON contains the JSON metadata for the -// struct [ZoneLoadBalancerDeleteResponseResult] -type zoneLoadBalancerDeleteResponseResultJSON struct { +// loadBalancerDeleteResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerDeleteResponseResult] +type loadBalancerDeleteResponseResultJSON struct { ID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ZoneLoadBalancerDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { +func (r *LoadBalancerDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } // Whether the API call was successful -type ZoneLoadBalancerDeleteResponseSuccess bool +type LoadBalancerDeleteResponseSuccess bool const ( - ZoneLoadBalancerDeleteResponseSuccessTrue ZoneLoadBalancerDeleteResponseSuccess = true + LoadBalancerDeleteResponseSuccessTrue LoadBalancerDeleteResponseSuccess = true ) -type ZoneLoadBalancerNewParams struct { +type LoadBalancerNewParams struct { // A list of pool IDs ordered by their failover priority. Pools defined here are // used by default, or when region_pools are not configured for a given region. DefaultPools param.Field[[]string] `json:"default_pools,required"` @@ -4351,7 +4359,7 @@ type ZoneLoadBalancerNewParams struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting param.Field[ZoneLoadBalancerNewParamsAdaptiveRouting] `json:"adaptive_routing"` + AdaptiveRouting param.Field[LoadBalancerNewParamsAdaptiveRouting] `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -4361,7 +4369,7 @@ type ZoneLoadBalancerNewParams struct { Description param.Field[string] `json:"description"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy param.Field[ZoneLoadBalancerNewParamsLocationStrategy] `json:"location_strategy"` + LocationStrategy param.Field[LoadBalancerNewParamsLocationStrategy] `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -4377,14 +4385,14 @@ type ZoneLoadBalancerNewParams struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering param.Field[ZoneLoadBalancerNewParamsRandomSteering] `json:"random_steering"` + RandomSteering param.Field[LoadBalancerNewParamsRandomSteering] `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools param.Field[interface{}] `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules param.Field[[]ZoneLoadBalancerNewParamsRule] `json:"rules"` + Rules param.Field[[]LoadBalancerNewParamsRule] `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -4408,9 +4416,9 @@ type ZoneLoadBalancerNewParams struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[ZoneLoadBalancerNewParamsSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[LoadBalancerNewParamsSessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes param.Field[ZoneLoadBalancerNewParamsSessionAffinityAttributes] `json:"session_affinity_attributes"` + SessionAffinityAttributes param.Field[LoadBalancerNewParamsSessionAffinityAttributes] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -4444,13 +4452,13 @@ type ZoneLoadBalancerNewParams struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy param.Field[ZoneLoadBalancerNewParamsSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[LoadBalancerNewParamsSteeringPolicy] `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. TTL param.Field[float64] `json:"ttl"` } -func (r ZoneLoadBalancerNewParams) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -4460,7 +4468,7 @@ func (r ZoneLoadBalancerNewParams) MarshalJSON() (data []byte, err error) { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerNewParamsAdaptiveRouting struct { +type LoadBalancerNewParamsAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the @@ -4470,20 +4478,20 @@ type ZoneLoadBalancerNewParamsAdaptiveRouting struct { FailoverAcrossPools param.Field[bool] `json:"failover_across_pools"` } -func (r ZoneLoadBalancerNewParamsAdaptiveRouting) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsAdaptiveRouting) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerNewParamsLocationStrategy struct { +type LoadBalancerNewParamsLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode param.Field[ZoneLoadBalancerNewParamsLocationStrategyMode] `json:"mode"` + Mode param.Field[LoadBalancerNewParamsLocationStrategyMode] `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -4491,10 +4499,10 @@ type ZoneLoadBalancerNewParamsLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs param.Field[ZoneLoadBalancerNewParamsLocationStrategyPreferEcs] `json:"prefer_ecs"` + PreferEcs param.Field[LoadBalancerNewParamsLocationStrategyPreferEcs] `json:"prefer_ecs"` } -func (r ZoneLoadBalancerNewParamsLocationStrategy) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsLocationStrategy) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -4504,11 +4512,11 @@ func (r ZoneLoadBalancerNewParamsLocationStrategy) MarshalJSON() (data []byte, e // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerNewParamsLocationStrategyMode string +type LoadBalancerNewParamsLocationStrategyMode string const ( - ZoneLoadBalancerNewParamsLocationStrategyModePop ZoneLoadBalancerNewParamsLocationStrategyMode = "pop" - ZoneLoadBalancerNewParamsLocationStrategyModeResolverIP ZoneLoadBalancerNewParamsLocationStrategyMode = "resolver_ip" + LoadBalancerNewParamsLocationStrategyModePop LoadBalancerNewParamsLocationStrategyMode = "pop" + LoadBalancerNewParamsLocationStrategyModeResolverIP LoadBalancerNewParamsLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -4518,13 +4526,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerNewParamsLocationStrategyPreferEcs string +type LoadBalancerNewParamsLocationStrategyPreferEcs string const ( - ZoneLoadBalancerNewParamsLocationStrategyPreferEcsAlways ZoneLoadBalancerNewParamsLocationStrategyPreferEcs = "always" - ZoneLoadBalancerNewParamsLocationStrategyPreferEcsNever ZoneLoadBalancerNewParamsLocationStrategyPreferEcs = "never" - ZoneLoadBalancerNewParamsLocationStrategyPreferEcsProximity ZoneLoadBalancerNewParamsLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerNewParamsLocationStrategyPreferEcsGeo ZoneLoadBalancerNewParamsLocationStrategyPreferEcs = "geo" + LoadBalancerNewParamsLocationStrategyPreferEcsAlways LoadBalancerNewParamsLocationStrategyPreferEcs = "always" + LoadBalancerNewParamsLocationStrategyPreferEcsNever LoadBalancerNewParamsLocationStrategyPreferEcs = "never" + LoadBalancerNewParamsLocationStrategyPreferEcsProximity LoadBalancerNewParamsLocationStrategyPreferEcs = "proximity" + LoadBalancerNewParamsLocationStrategyPreferEcsGeo LoadBalancerNewParamsLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -4535,7 +4543,7 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerNewParamsRandomSteering struct { +type LoadBalancerNewParamsRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight param.Field[float64] `json:"default_weight"` @@ -4544,13 +4552,13 @@ type ZoneLoadBalancerNewParamsRandomSteering struct { PoolWeights param.Field[interface{}] `json:"pool_weights"` } -func (r ZoneLoadBalancerNewParamsRandomSteering) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRandomSteering) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerNewParamsRule struct { +type LoadBalancerNewParamsRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -4562,12 +4570,12 @@ type ZoneLoadBalancerNewParamsRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse param.Field[ZoneLoadBalancerNewParamsRulesFixedResponse] `json:"fixed_response"` + FixedResponse param.Field[LoadBalancerNewParamsRulesFixedResponse] `json:"fixed_response"` // Name of this rule. Only used for human readability. Name param.Field[string] `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides param.Field[ZoneLoadBalancerNewParamsRulesOverrides] `json:"overrides"` + Overrides param.Field[LoadBalancerNewParamsRulesOverrides] `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -4578,14 +4586,14 @@ type ZoneLoadBalancerNewParamsRule struct { Terminates param.Field[bool] `json:"terminates"` } -func (r ZoneLoadBalancerNewParamsRule) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRule) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerNewParamsRulesFixedResponse struct { +type LoadBalancerNewParamsRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType param.Field[string] `json:"content_type"` // The http 'Location' header to include in the response. @@ -4596,20 +4604,20 @@ type ZoneLoadBalancerNewParamsRulesFixedResponse struct { StatusCode param.Field[int64] `json:"status_code"` } -func (r ZoneLoadBalancerNewParamsRulesFixedResponse) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesFixedResponse) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerNewParamsRulesOverrides struct { +type LoadBalancerNewParamsRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting param.Field[ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting] `json:"adaptive_routing"` + AdaptiveRouting param.Field[LoadBalancerNewParamsRulesOverridesAdaptiveRouting] `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -4622,7 +4630,7 @@ type ZoneLoadBalancerNewParamsRulesOverrides struct { FallbackPool param.Field[interface{}] `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy param.Field[ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy] `json:"location_strategy"` + LocationStrategy param.Field[LoadBalancerNewParamsRulesOverridesLocationStrategy] `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -4636,7 +4644,7 @@ type ZoneLoadBalancerNewParamsRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering param.Field[ZoneLoadBalancerNewParamsRulesOverridesRandomSteering] `json:"random_steering"` + RandomSteering param.Field[LoadBalancerNewParamsRulesOverridesRandomSteering] `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -4664,9 +4672,9 @@ type ZoneLoadBalancerNewParamsRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[LoadBalancerNewParamsRulesOverridesSessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes param.Field[ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes] `json:"session_affinity_attributes"` + SessionAffinityAttributes param.Field[LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -4700,13 +4708,13 @@ type ZoneLoadBalancerNewParamsRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy param.Field[ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[LoadBalancerNewParamsRulesOverridesSteeringPolicy] `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. TTL param.Field[float64] `json:"ttl"` } -func (r ZoneLoadBalancerNewParamsRulesOverrides) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesOverrides) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -4716,7 +4724,7 @@ func (r ZoneLoadBalancerNewParamsRulesOverrides) MarshalJSON() (data []byte, err // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting struct { +type LoadBalancerNewParamsRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the @@ -4726,20 +4734,20 @@ type ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting struct { FailoverAcrossPools param.Field[bool] `json:"failover_across_pools"` } -func (r ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesOverridesAdaptiveRouting) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy struct { +type LoadBalancerNewParamsRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode param.Field[ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyMode] `json:"mode"` + Mode param.Field[LoadBalancerNewParamsRulesOverridesLocationStrategyMode] `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -4747,10 +4755,10 @@ type ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs param.Field[ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs] `json:"prefer_ecs"` + PreferEcs param.Field[LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs] `json:"prefer_ecs"` } -func (r ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesOverridesLocationStrategy) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -4760,11 +4768,11 @@ func (r ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy) MarshalJSON() ( // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyMode string +type LoadBalancerNewParamsRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyModePop ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerNewParamsRulesOverridesLocationStrategyModePop LoadBalancerNewParamsRulesOverridesLocationStrategyMode = "pop" + LoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP LoadBalancerNewParamsRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -4774,13 +4782,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsNever LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -4791,7 +4799,7 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerNewParamsRulesOverridesRandomSteering struct { +type LoadBalancerNewParamsRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight param.Field[float64] `json:"default_weight"` @@ -4800,7 +4808,7 @@ type ZoneLoadBalancerNewParamsRulesOverridesRandomSteering struct { PoolWeights param.Field[interface{}] `json:"pool_weights"` } -func (r ZoneLoadBalancerNewParamsRulesOverridesRandomSteering) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesOverridesRandomSteering) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -4827,18 +4835,18 @@ func (r ZoneLoadBalancerNewParamsRulesOverridesRandomSteering) MarshalJSON() (da // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity string +type LoadBalancerNewParamsRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityNone ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityCookie ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityHeader ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityEmpty ZoneLoadBalancerNewParamsRulesOverridesSessionAffinity = "\"\"" + LoadBalancerNewParamsRulesOverridesSessionAffinityNone LoadBalancerNewParamsRulesOverridesSessionAffinity = "none" + LoadBalancerNewParamsRulesOverridesSessionAffinityCookie LoadBalancerNewParamsRulesOverridesSessionAffinity = "cookie" + LoadBalancerNewParamsRulesOverridesSessionAffinityIPCookie LoadBalancerNewParamsRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerNewParamsRulesOverridesSessionAffinityHeader LoadBalancerNewParamsRulesOverridesSessionAffinity = "header" + LoadBalancerNewParamsRulesOverridesSessionAffinityEmpty LoadBalancerNewParamsRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration param.Field[float64] `json:"drain_duration"` @@ -4865,12 +4873,12 @@ type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite param.Field[ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite] `json:"samesite"` + Samesite param.Field[LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite] `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure param.Field[ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure] `json:"secure"` + Secure param.Field[LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure] `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -4882,35 +4890,35 @@ type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover param.Field[ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` + ZeroDowntimeFailover param.Field[LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` } -func (r ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -4924,12 +4932,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -4954,17 +4962,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy string +type LoadBalancerNewParamsRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyOff ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyGeo ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyRandom ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyProximity ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerNewParamsRulesOverridesSteeringPolicyOff LoadBalancerNewParamsRulesOverridesSteeringPolicy = "off" + LoadBalancerNewParamsRulesOverridesSteeringPolicyGeo LoadBalancerNewParamsRulesOverridesSteeringPolicy = "geo" + LoadBalancerNewParamsRulesOverridesSteeringPolicyRandom LoadBalancerNewParamsRulesOverridesSteeringPolicy = "random" + LoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency LoadBalancerNewParamsRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerNewParamsRulesOverridesSteeringPolicyProximity LoadBalancerNewParamsRulesOverridesSteeringPolicy = "proximity" + LoadBalancerNewParamsRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerNewParamsRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerNewParamsRulesOverridesSteeringPolicyLeastConnections LoadBalancerNewParamsRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerNewParamsRulesOverridesSteeringPolicyEmpty LoadBalancerNewParamsRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -4990,18 +4998,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerNewParamsSessionAffinity string +type LoadBalancerNewParamsSessionAffinity string const ( - ZoneLoadBalancerNewParamsSessionAffinityNone ZoneLoadBalancerNewParamsSessionAffinity = "none" - ZoneLoadBalancerNewParamsSessionAffinityCookie ZoneLoadBalancerNewParamsSessionAffinity = "cookie" - ZoneLoadBalancerNewParamsSessionAffinityIPCookie ZoneLoadBalancerNewParamsSessionAffinity = "ip_cookie" - ZoneLoadBalancerNewParamsSessionAffinityHeader ZoneLoadBalancerNewParamsSessionAffinity = "header" - ZoneLoadBalancerNewParamsSessionAffinityEmpty ZoneLoadBalancerNewParamsSessionAffinity = "\"\"" + LoadBalancerNewParamsSessionAffinityNone LoadBalancerNewParamsSessionAffinity = "none" + LoadBalancerNewParamsSessionAffinityCookie LoadBalancerNewParamsSessionAffinity = "cookie" + LoadBalancerNewParamsSessionAffinityIPCookie LoadBalancerNewParamsSessionAffinity = "ip_cookie" + LoadBalancerNewParamsSessionAffinityHeader LoadBalancerNewParamsSessionAffinity = "header" + LoadBalancerNewParamsSessionAffinityEmpty LoadBalancerNewParamsSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerNewParamsSessionAffinityAttributes struct { +type LoadBalancerNewParamsSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration param.Field[float64] `json:"drain_duration"` @@ -5028,12 +5036,12 @@ type ZoneLoadBalancerNewParamsSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite param.Field[ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite] `json:"samesite"` + Samesite param.Field[LoadBalancerNewParamsSessionAffinityAttributesSamesite] `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure param.Field[ZoneLoadBalancerNewParamsSessionAffinityAttributesSecure] `json:"secure"` + Secure param.Field[LoadBalancerNewParamsSessionAffinityAttributesSecure] `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -5045,35 +5053,35 @@ type ZoneLoadBalancerNewParamsSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover param.Field[ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` + ZeroDowntimeFailover param.Field[LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` } -func (r ZoneLoadBalancerNewParamsSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerNewParamsSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite string +type LoadBalancerNewParamsSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesiteLax ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesiteNone ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesite = "Strict" + LoadBalancerNewParamsSessionAffinityAttributesSamesiteAuto LoadBalancerNewParamsSessionAffinityAttributesSamesite = "Auto" + LoadBalancerNewParamsSessionAffinityAttributesSamesiteLax LoadBalancerNewParamsSessionAffinityAttributesSamesite = "Lax" + LoadBalancerNewParamsSessionAffinityAttributesSamesiteNone LoadBalancerNewParamsSessionAffinityAttributesSamesite = "None" + LoadBalancerNewParamsSessionAffinityAttributesSamesiteStrict LoadBalancerNewParamsSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerNewParamsSessionAffinityAttributesSecure string +type LoadBalancerNewParamsSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerNewParamsSessionAffinityAttributesSecureAuto ZoneLoadBalancerNewParamsSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerNewParamsSessionAffinityAttributesSecureAlways ZoneLoadBalancerNewParamsSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerNewParamsSessionAffinityAttributesSecureNever ZoneLoadBalancerNewParamsSessionAffinityAttributesSecure = "Never" + LoadBalancerNewParamsSessionAffinityAttributesSecureAuto LoadBalancerNewParamsSessionAffinityAttributesSecure = "Auto" + LoadBalancerNewParamsSessionAffinityAttributesSecureAlways LoadBalancerNewParamsSessionAffinityAttributesSecure = "Always" + LoadBalancerNewParamsSessionAffinityAttributesSecureNever LoadBalancerNewParamsSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -5087,12 +5095,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -5117,20 +5125,20 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerNewParamsSteeringPolicy string +type LoadBalancerNewParamsSteeringPolicy string const ( - ZoneLoadBalancerNewParamsSteeringPolicyOff ZoneLoadBalancerNewParamsSteeringPolicy = "off" - ZoneLoadBalancerNewParamsSteeringPolicyGeo ZoneLoadBalancerNewParamsSteeringPolicy = "geo" - ZoneLoadBalancerNewParamsSteeringPolicyRandom ZoneLoadBalancerNewParamsSteeringPolicy = "random" - ZoneLoadBalancerNewParamsSteeringPolicyDynamicLatency ZoneLoadBalancerNewParamsSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerNewParamsSteeringPolicyProximity ZoneLoadBalancerNewParamsSteeringPolicy = "proximity" - ZoneLoadBalancerNewParamsSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerNewParamsSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerNewParamsSteeringPolicyLeastConnections ZoneLoadBalancerNewParamsSteeringPolicy = "least_connections" - ZoneLoadBalancerNewParamsSteeringPolicyEmpty ZoneLoadBalancerNewParamsSteeringPolicy = "\"\"" + LoadBalancerNewParamsSteeringPolicyOff LoadBalancerNewParamsSteeringPolicy = "off" + LoadBalancerNewParamsSteeringPolicyGeo LoadBalancerNewParamsSteeringPolicy = "geo" + LoadBalancerNewParamsSteeringPolicyRandom LoadBalancerNewParamsSteeringPolicy = "random" + LoadBalancerNewParamsSteeringPolicyDynamicLatency LoadBalancerNewParamsSteeringPolicy = "dynamic_latency" + LoadBalancerNewParamsSteeringPolicyProximity LoadBalancerNewParamsSteeringPolicy = "proximity" + LoadBalancerNewParamsSteeringPolicyLeastOutstandingRequests LoadBalancerNewParamsSteeringPolicy = "least_outstanding_requests" + LoadBalancerNewParamsSteeringPolicyLeastConnections LoadBalancerNewParamsSteeringPolicy = "least_connections" + LoadBalancerNewParamsSteeringPolicyEmpty LoadBalancerNewParamsSteeringPolicy = "\"\"" ) -type ZoneLoadBalancerUpdateParams struct { +type LoadBalancerUpdateParams struct { // A list of pool IDs ordered by their failover priority. Pools defined here are // used by default, or when region_pools are not configured for a given region. DefaultPools param.Field[[]string] `json:"default_pools,required"` @@ -5146,7 +5154,7 @@ type ZoneLoadBalancerUpdateParams struct { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting param.Field[ZoneLoadBalancerUpdateParamsAdaptiveRouting] `json:"adaptive_routing"` + AdaptiveRouting param.Field[LoadBalancerUpdateParamsAdaptiveRouting] `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -5158,7 +5166,7 @@ type ZoneLoadBalancerUpdateParams struct { Enabled param.Field[bool] `json:"enabled"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy param.Field[ZoneLoadBalancerUpdateParamsLocationStrategy] `json:"location_strategy"` + LocationStrategy param.Field[LoadBalancerUpdateParamsLocationStrategy] `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -5174,14 +5182,14 @@ type ZoneLoadBalancerUpdateParams struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering param.Field[ZoneLoadBalancerUpdateParamsRandomSteering] `json:"random_steering"` + RandomSteering param.Field[LoadBalancerUpdateParamsRandomSteering] `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. RegionPools param.Field[interface{}] `json:"region_pools"` // BETA Field Not General Access: A list of rules for this load balancer to // execute. - Rules param.Field[[]ZoneLoadBalancerUpdateParamsRule] `json:"rules"` + Rules param.Field[[]LoadBalancerUpdateParamsRule] `json:"rules"` // Specifies the type of session affinity the load balancer should use unless // specified as `"none"` or "" (default). The supported types are: // @@ -5205,9 +5213,9 @@ type ZoneLoadBalancerUpdateParams struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[ZoneLoadBalancerUpdateParamsSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[LoadBalancerUpdateParamsSessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes param.Field[ZoneLoadBalancerUpdateParamsSessionAffinityAttributes] `json:"session_affinity_attributes"` + SessionAffinityAttributes param.Field[LoadBalancerUpdateParamsSessionAffinityAttributes] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -5241,13 +5249,13 @@ type ZoneLoadBalancerUpdateParams struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy param.Field[ZoneLoadBalancerUpdateParamsSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[LoadBalancerUpdateParamsSteeringPolicy] `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. TTL param.Field[float64] `json:"ttl"` } -func (r ZoneLoadBalancerUpdateParams) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -5257,7 +5265,7 @@ func (r ZoneLoadBalancerUpdateParams) MarshalJSON() (data []byte, err error) { // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerUpdateParamsAdaptiveRouting struct { +type LoadBalancerUpdateParamsAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the @@ -5267,20 +5275,20 @@ type ZoneLoadBalancerUpdateParamsAdaptiveRouting struct { FailoverAcrossPools param.Field[bool] `json:"failover_across_pools"` } -func (r ZoneLoadBalancerUpdateParamsAdaptiveRouting) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsAdaptiveRouting) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerUpdateParamsLocationStrategy struct { +type LoadBalancerUpdateParamsLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode param.Field[ZoneLoadBalancerUpdateParamsLocationStrategyMode] `json:"mode"` + Mode param.Field[LoadBalancerUpdateParamsLocationStrategyMode] `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -5288,10 +5296,10 @@ type ZoneLoadBalancerUpdateParamsLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs param.Field[ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs] `json:"prefer_ecs"` + PreferEcs param.Field[LoadBalancerUpdateParamsLocationStrategyPreferEcs] `json:"prefer_ecs"` } -func (r ZoneLoadBalancerUpdateParamsLocationStrategy) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsLocationStrategy) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -5301,11 +5309,11 @@ func (r ZoneLoadBalancerUpdateParamsLocationStrategy) MarshalJSON() (data []byte // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerUpdateParamsLocationStrategyMode string +type LoadBalancerUpdateParamsLocationStrategyMode string const ( - ZoneLoadBalancerUpdateParamsLocationStrategyModePop ZoneLoadBalancerUpdateParamsLocationStrategyMode = "pop" - ZoneLoadBalancerUpdateParamsLocationStrategyModeResolverIP ZoneLoadBalancerUpdateParamsLocationStrategyMode = "resolver_ip" + LoadBalancerUpdateParamsLocationStrategyModePop LoadBalancerUpdateParamsLocationStrategyMode = "pop" + LoadBalancerUpdateParamsLocationStrategyModeResolverIP LoadBalancerUpdateParamsLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -5315,13 +5323,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs string +type LoadBalancerUpdateParamsLocationStrategyPreferEcs string const ( - ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcsAlways ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs = "always" - ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcsNever ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs = "never" - ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcsProximity ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcsGeo ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcs = "geo" + LoadBalancerUpdateParamsLocationStrategyPreferEcsAlways LoadBalancerUpdateParamsLocationStrategyPreferEcs = "always" + LoadBalancerUpdateParamsLocationStrategyPreferEcsNever LoadBalancerUpdateParamsLocationStrategyPreferEcs = "never" + LoadBalancerUpdateParamsLocationStrategyPreferEcsProximity LoadBalancerUpdateParamsLocationStrategyPreferEcs = "proximity" + LoadBalancerUpdateParamsLocationStrategyPreferEcsGeo LoadBalancerUpdateParamsLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -5332,7 +5340,7 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerUpdateParamsRandomSteering struct { +type LoadBalancerUpdateParamsRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight param.Field[float64] `json:"default_weight"` @@ -5341,13 +5349,13 @@ type ZoneLoadBalancerUpdateParamsRandomSteering struct { PoolWeights param.Field[interface{}] `json:"pool_weights"` } -func (r ZoneLoadBalancerUpdateParamsRandomSteering) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRandomSteering) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A rule object containing conditions and overrides for this load balancer to // evaluate. -type ZoneLoadBalancerUpdateParamsRule struct { +type LoadBalancerUpdateParamsRule struct { // The condition expressions to evaluate. If the condition evaluates to true, the // overrides or fixed_response in this rule will be applied. An empty condition is // always true. For more details on condition expressions, please see @@ -5359,12 +5367,12 @@ type ZoneLoadBalancerUpdateParamsRule struct { // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. - FixedResponse param.Field[ZoneLoadBalancerUpdateParamsRulesFixedResponse] `json:"fixed_response"` + FixedResponse param.Field[LoadBalancerUpdateParamsRulesFixedResponse] `json:"fixed_response"` // Name of this rule. Only used for human readability. Name param.Field[string] `json:"name"` // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. - Overrides param.Field[ZoneLoadBalancerUpdateParamsRulesOverrides] `json:"overrides"` + Overrides param.Field[LoadBalancerUpdateParamsRulesOverrides] `json:"overrides"` // The order in which rules should be executed in relation to each other. Lower // values are executed first. Values do not need to be sequential. If no value is // provided for any rule the array order of the rules field will be used to assign @@ -5375,14 +5383,14 @@ type ZoneLoadBalancerUpdateParamsRule struct { Terminates param.Field[bool] `json:"terminates"` } -func (r ZoneLoadBalancerUpdateParamsRule) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRule) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A collection of fields used to directly respond to the eyeball instead of // routing to a pool. If a fixed_response is supplied the rule will be marked as // terminates. -type ZoneLoadBalancerUpdateParamsRulesFixedResponse struct { +type LoadBalancerUpdateParamsRulesFixedResponse struct { // The http 'Content-Type' header to include in the response. ContentType param.Field[string] `json:"content_type"` // The http 'Location' header to include in the response. @@ -5393,20 +5401,20 @@ type ZoneLoadBalancerUpdateParamsRulesFixedResponse struct { StatusCode param.Field[int64] `json:"status_code"` } -func (r ZoneLoadBalancerUpdateParamsRulesFixedResponse) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesFixedResponse) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A collection of overrides to apply to the load balancer when this rule's // condition is true. All fields are optional. -type ZoneLoadBalancerUpdateParamsRulesOverrides struct { +type LoadBalancerUpdateParamsRulesOverrides struct { // Controls features that modify the routing of requests to pools and origins in // response to dynamic conditions, such as during the interval between active // health monitoring requests. For example, zero-downtime failover occurs // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. - AdaptiveRouting param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting] `json:"adaptive_routing"` + AdaptiveRouting param.Field[LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting] `json:"adaptive_routing"` // A mapping of country codes to a list of pool IDs (ordered by their failover // priority) for the given country. Any country not explicitly defined will fall // back to using the corresponding region_pool mapping if it exists else to @@ -5419,7 +5427,7 @@ type ZoneLoadBalancerUpdateParamsRulesOverrides struct { FallbackPool param.Field[interface{}] `json:"fallback_pool"` // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. - LocationStrategy param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy] `json:"location_strategy"` + LocationStrategy param.Field[LoadBalancerUpdateParamsRulesOverridesLocationStrategy] `json:"location_strategy"` // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not // explicitly defined will fall back to using the corresponding country_pool, then @@ -5433,7 +5441,7 @@ type ZoneLoadBalancerUpdateParamsRulesOverrides struct { // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. - RandomSteering param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering] `json:"random_steering"` + RandomSteering param.Field[LoadBalancerUpdateParamsRulesOverridesRandomSteering] `json:"random_steering"` // A mapping of region codes to a list of pool IDs (ordered by their failover // priority) for the given region. Any regions not explicitly defined will fall // back to using default_pools. @@ -5461,9 +5469,9 @@ type ZoneLoadBalancerUpdateParamsRulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[LoadBalancerUpdateParamsRulesOverridesSessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. - SessionAffinityAttributes param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes] `json:"session_affinity_attributes"` + SessionAffinityAttributes param.Field[LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the // expiry time has been reached, subsequent requests may get sent to a different // origin server. The accepted ranges per `session_affinity` policy are: @@ -5497,13 +5505,13 @@ type ZoneLoadBalancerUpdateParamsRulesOverrides struct { // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - SteeringPolicy param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[LoadBalancerUpdateParamsRulesOverridesSteeringPolicy] `json:"steering_policy"` // Time to live (TTL) of the DNS entry for the IP address returned by this load // balancer. This only applies to gray-clouded (unproxied) load balancers. TTL param.Field[float64] `json:"ttl"` } -func (r ZoneLoadBalancerUpdateParamsRulesOverrides) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesOverrides) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -5513,7 +5521,7 @@ func (r ZoneLoadBalancerUpdateParamsRulesOverrides) MarshalJSON() (data []byte, // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 // response codes. If there is another healthy origin in the same pool, the request // is retried once against this alternate origin. -type ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting struct { +type LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting struct { // Extends zero-downtime failover of requests to healthy origins from alternate // pools, when no healthy alternate exists in the same pool, according to the // failover order defined by traffic and origin steering. When set false (the @@ -5523,20 +5531,20 @@ type ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting struct { FailoverAcrossPools param.Field[bool] `json:"failover_across_pools"` } -func (r ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Controls location-based steering for non-proxied requests. See `steering_policy` // to learn how steering is affected. -type ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy struct { +type LoadBalancerUpdateParamsRulesOverridesLocationStrategy struct { // Determines the authoritative location when ECS is not preferred, does not exist // in the request, or its GeoIP lookup is unsuccessful. // // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. - Mode param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyMode] `json:"mode"` + Mode param.Field[LoadBalancerUpdateParamsRulesOverridesLocationStrategyMode] `json:"mode"` // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the // authoritative location. // @@ -5544,10 +5552,10 @@ type ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy struct { // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - PreferEcs param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs] `json:"prefer_ecs"` + PreferEcs param.Field[LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs] `json:"prefer_ecs"` } -func (r ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesOverridesLocationStrategy) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -5557,11 +5565,11 @@ func (r ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy) MarshalJSON( // - `"pop"`: Use the Cloudflare PoP location. // - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is // unsuccessful, use the Cloudflare PoP location. -type ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyMode string +type LoadBalancerUpdateParamsRulesOverridesLocationStrategyMode string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyModePop ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyMode = "pop" - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyMode = "resolver_ip" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyModePop LoadBalancerUpdateParamsRulesOverridesLocationStrategyMode = "pop" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP LoadBalancerUpdateParamsRulesOverridesLocationStrategyMode = "resolver_ip" ) // Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the @@ -5571,13 +5579,13 @@ const ( // - `"never"`: Never prefer ECS. // - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. // - `"geo"`: Prefer ECS only when `steering_policy="geo"`. -type ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs string +type LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "always" - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsNever ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "never" - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsProximity ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "proximity" - ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsGeo ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "geo" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "always" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsNever LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "never" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsProximity LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "proximity" + LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsGeo LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcs = "geo" ) // Configures pool weights. @@ -5588,7 +5596,7 @@ const ( // pool's outstanding requests. // - `steering_policy="least_connections"`: Use pool weights to scale each pool's // open connections. -type ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering struct { +type LoadBalancerUpdateParamsRulesOverridesRandomSteering struct { // The default weight for pools in the load balancer that are not specified in the // pool_weights map. DefaultWeight param.Field[float64] `json:"default_weight"` @@ -5597,7 +5605,7 @@ type ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering struct { PoolWeights param.Field[interface{}] `json:"pool_weights"` } -func (r ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesOverridesRandomSteering) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } @@ -5624,18 +5632,18 @@ func (r ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering) MarshalJSON() // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity string +type LoadBalancerUpdateParamsRulesOverridesSessionAffinity string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityNone ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity = "none" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity = "cookie" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityIPCookie ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity = "ip_cookie" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityHeader ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity = "header" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityEmpty ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinity = "\"\"" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityNone LoadBalancerUpdateParamsRulesOverridesSessionAffinity = "none" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie LoadBalancerUpdateParamsRulesOverridesSessionAffinity = "cookie" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityIPCookie LoadBalancerUpdateParamsRulesOverridesSessionAffinity = "ip_cookie" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityHeader LoadBalancerUpdateParamsRulesOverridesSessionAffinity = "header" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityEmpty LoadBalancerUpdateParamsRulesOverridesSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes struct { +type LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration param.Field[float64] `json:"drain_duration"` @@ -5662,12 +5670,12 @@ type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes struct // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite] `json:"samesite"` + Samesite param.Field[LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite] `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure] `json:"secure"` + Secure param.Field[LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure] `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -5679,35 +5687,35 @@ type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes struct // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover param.Field[ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` + ZeroDowntimeFailover param.Field[LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` } -func (r ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite string +type LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteLax ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteNone ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Strict" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Auto" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteLax LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Lax" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteNone LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "None" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteStrict LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure string +type LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAlways ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureNever ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Never" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Auto" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAlways LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Always" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureNever LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -5721,12 +5729,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -5751,17 +5759,17 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy string +type LoadBalancerUpdateParamsRulesOverridesSteeringPolicy string const ( - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyOff ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "off" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyGeo ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "geo" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyRandom ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "random" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyProximity ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "proximity" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyLeastConnections ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "least_connections" - ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyEmpty ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "\"\"" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyOff LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "off" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyGeo LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "geo" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyRandom LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "random" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "dynamic_latency" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyProximity LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "proximity" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "least_outstanding_requests" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyLeastConnections LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "least_connections" + LoadBalancerUpdateParamsRulesOverridesSteeringPolicyEmpty LoadBalancerUpdateParamsRulesOverridesSteeringPolicy = "\"\"" ) // Specifies the type of session affinity the load balancer should use unless @@ -5787,18 +5795,18 @@ const ( // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. -type ZoneLoadBalancerUpdateParamsSessionAffinity string +type LoadBalancerUpdateParamsSessionAffinity string const ( - ZoneLoadBalancerUpdateParamsSessionAffinityNone ZoneLoadBalancerUpdateParamsSessionAffinity = "none" - ZoneLoadBalancerUpdateParamsSessionAffinityCookie ZoneLoadBalancerUpdateParamsSessionAffinity = "cookie" - ZoneLoadBalancerUpdateParamsSessionAffinityIPCookie ZoneLoadBalancerUpdateParamsSessionAffinity = "ip_cookie" - ZoneLoadBalancerUpdateParamsSessionAffinityHeader ZoneLoadBalancerUpdateParamsSessionAffinity = "header" - ZoneLoadBalancerUpdateParamsSessionAffinityEmpty ZoneLoadBalancerUpdateParamsSessionAffinity = "\"\"" + LoadBalancerUpdateParamsSessionAffinityNone LoadBalancerUpdateParamsSessionAffinity = "none" + LoadBalancerUpdateParamsSessionAffinityCookie LoadBalancerUpdateParamsSessionAffinity = "cookie" + LoadBalancerUpdateParamsSessionAffinityIPCookie LoadBalancerUpdateParamsSessionAffinity = "ip_cookie" + LoadBalancerUpdateParamsSessionAffinityHeader LoadBalancerUpdateParamsSessionAffinity = "header" + LoadBalancerUpdateParamsSessionAffinityEmpty LoadBalancerUpdateParamsSessionAffinity = "\"\"" ) // Configures attributes for session affinity. -type ZoneLoadBalancerUpdateParamsSessionAffinityAttributes struct { +type LoadBalancerUpdateParamsSessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session // affinity is enabled on the load balancer. DrainDuration param.Field[float64] `json:"drain_duration"` @@ -5825,12 +5833,12 @@ type ZoneLoadBalancerUpdateParamsSessionAffinityAttributes struct { // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". - Samesite param.Field[ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite] `json:"samesite"` + Samesite param.Field[LoadBalancerUpdateParamsSessionAffinityAttributesSamesite] `json:"samesite"` // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. - Secure param.Field[ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecure] `json:"secure"` + Secure param.Field[LoadBalancerUpdateParamsSessionAffinityAttributesSecure] `json:"secure"` // Configures the zero-downtime failover between origins within a pool when session // affinity is enabled. This feature is currently incompatible with Argo, Tiered // Cache, and Bandwidth Alliance. The supported values are: @@ -5842,35 +5850,35 @@ type ZoneLoadBalancerUpdateParamsSessionAffinityAttributes struct { // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. - ZeroDowntimeFailover param.Field[ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` + ZeroDowntimeFailover param.Field[LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover] `json:"zero_downtime_failover"` } -func (r ZoneLoadBalancerUpdateParamsSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { +func (r LoadBalancerUpdateParamsSessionAffinityAttributes) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configures the SameSite attribute on session affinity cookie. Value "Auto" will // be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: // when using value "None", the secure attribute can not be set to "Never". -type ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite string +type LoadBalancerUpdateParamsSessionAffinityAttributesSamesite string const ( - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesiteAuto ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Auto" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesiteLax ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Lax" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesiteNone ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "None" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesiteStrict ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Strict" + LoadBalancerUpdateParamsSessionAffinityAttributesSamesiteAuto LoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Auto" + LoadBalancerUpdateParamsSessionAffinityAttributesSamesiteLax LoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Lax" + LoadBalancerUpdateParamsSessionAffinityAttributesSamesiteNone LoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "None" + LoadBalancerUpdateParamsSessionAffinityAttributesSamesiteStrict LoadBalancerUpdateParamsSessionAffinityAttributesSamesite = "Strict" ) // Configures the Secure attribute on session affinity cookie. Value "Always" // indicates the Secure attribute will be set in the Set-Cookie header, "Never" // indicates the Secure attribute will not be set, and "Auto" will set the Secure // attribute depending if Always Use HTTPS is enabled. -type ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecure string +type LoadBalancerUpdateParamsSessionAffinityAttributesSecure string const ( - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecureAuto ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Auto" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecureAlways ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Always" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecureNever ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Never" + LoadBalancerUpdateParamsSessionAffinityAttributesSecureAuto LoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Auto" + LoadBalancerUpdateParamsSessionAffinityAttributesSecureAlways LoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Always" + LoadBalancerUpdateParamsSessionAffinityAttributesSecureNever LoadBalancerUpdateParamsSessionAffinityAttributesSecure = "Never" ) // Configures the zero-downtime failover between origins within a pool when session @@ -5884,12 +5892,12 @@ const ( // - `"sticky"`: The session affinity cookie is updated and subsequent requests are // sent to the new origin. Note: Zero-downtime failover with sticky sessions is // currently not supported for session affinity by header. -type ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover string +type LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover string const ( - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverNone ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "none" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverTemporary ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "temporary" - ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverSticky ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "sticky" + LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverNone LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "none" + LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverTemporary LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "temporary" + LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverSticky LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailover = "sticky" ) // Steering Policy for this load balancer. @@ -5914,15 +5922,15 @@ const ( // others. Supported for HTTP/1 and HTTP/2 connections. // - `""`: Will map to `"geo"` if you use // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. -type ZoneLoadBalancerUpdateParamsSteeringPolicy string +type LoadBalancerUpdateParamsSteeringPolicy string const ( - ZoneLoadBalancerUpdateParamsSteeringPolicyOff ZoneLoadBalancerUpdateParamsSteeringPolicy = "off" - ZoneLoadBalancerUpdateParamsSteeringPolicyGeo ZoneLoadBalancerUpdateParamsSteeringPolicy = "geo" - ZoneLoadBalancerUpdateParamsSteeringPolicyRandom ZoneLoadBalancerUpdateParamsSteeringPolicy = "random" - ZoneLoadBalancerUpdateParamsSteeringPolicyDynamicLatency ZoneLoadBalancerUpdateParamsSteeringPolicy = "dynamic_latency" - ZoneLoadBalancerUpdateParamsSteeringPolicyProximity ZoneLoadBalancerUpdateParamsSteeringPolicy = "proximity" - ZoneLoadBalancerUpdateParamsSteeringPolicyLeastOutstandingRequests ZoneLoadBalancerUpdateParamsSteeringPolicy = "least_outstanding_requests" - ZoneLoadBalancerUpdateParamsSteeringPolicyLeastConnections ZoneLoadBalancerUpdateParamsSteeringPolicy = "least_connections" - ZoneLoadBalancerUpdateParamsSteeringPolicyEmpty ZoneLoadBalancerUpdateParamsSteeringPolicy = "\"\"" + LoadBalancerUpdateParamsSteeringPolicyOff LoadBalancerUpdateParamsSteeringPolicy = "off" + LoadBalancerUpdateParamsSteeringPolicyGeo LoadBalancerUpdateParamsSteeringPolicy = "geo" + LoadBalancerUpdateParamsSteeringPolicyRandom LoadBalancerUpdateParamsSteeringPolicy = "random" + LoadBalancerUpdateParamsSteeringPolicyDynamicLatency LoadBalancerUpdateParamsSteeringPolicy = "dynamic_latency" + LoadBalancerUpdateParamsSteeringPolicyProximity LoadBalancerUpdateParamsSteeringPolicy = "proximity" + LoadBalancerUpdateParamsSteeringPolicyLeastOutstandingRequests LoadBalancerUpdateParamsSteeringPolicy = "least_outstanding_requests" + LoadBalancerUpdateParamsSteeringPolicyLeastConnections LoadBalancerUpdateParamsSteeringPolicy = "least_connections" + LoadBalancerUpdateParamsSteeringPolicyEmpty LoadBalancerUpdateParamsSteeringPolicy = "\"\"" ) diff --git a/zoneloadbalancer_test.go b/loadbalancer_test.go similarity index 63% rename from zoneloadbalancer_test.go rename to loadbalancer_test.go index 3d8d61f72fb..caaf91bd50d 100644 --- a/zoneloadbalancer_test.go +++ b/loadbalancer_test.go @@ -13,7 +13,8 @@ import ( "github.com/cloudflare/cloudflare-sdk-go/option" ) -func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { +func TestLoadBalancerNewWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,17 +25,18 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.LoadBalancers.New( + _, err := client.LoadBalancers.New( context.TODO(), "699d98642c564d2e855e9661899b7252", - cloudflare.ZoneLoadBalancerNewParams{ + cloudflare.LoadBalancerNewParams{ DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), Name: cloudflare.F("www.example.com"), - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsAdaptiveRouting{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerNewParamsAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -47,9 +49,9 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }, }), Description: cloudflare.F("Load Balancer for www.example.com"), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerNewParamsLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerNewParamsLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerNewParamsLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -65,7 +67,7 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }, }), Proxied: cloudflare.F(true), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerNewParamsRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -81,18 +83,18 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - Rules: cloudflare.F([]cloudflare.ZoneLoadBalancerNewParamsRule{{ + Rules: cloudflare.F([]cloudflare.LoadBalancerNewParamsRule{{ Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -106,9 +108,9 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -123,7 +125,7 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -139,17 +141,17 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -157,15 +159,15 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }, { Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -179,9 +181,9 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -196,7 +198,7 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -212,17 +214,17 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -230,15 +232,15 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }, { Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -252,9 +254,9 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -269,7 +271,7 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -285,33 +287,33 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerNewParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), Terminates: cloudflare.F(true), }}), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerNewParamsSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerNewParamsSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerNewParamsSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerNewParamsSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerNewParamsSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerNewParamsSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerNewParamsSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }, ) @@ -324,7 +326,8 @@ func TestZoneLoadBalancerNewWithOptionalParams(t *testing.T) { } } -func TestZoneLoadBalancerGet(t *testing.T) { +func TestLoadBalancerGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -335,10 +338,11 @@ func TestZoneLoadBalancerGet(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.LoadBalancers.Get( + _, err := client.LoadBalancers.Get( context.TODO(), "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -352,7 +356,8 @@ func TestZoneLoadBalancerGet(t *testing.T) { } } -func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { +func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -363,18 +368,19 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.LoadBalancers.Update( + _, err := client.LoadBalancers.Update( context.TODO(), "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", - cloudflare.ZoneLoadBalancerUpdateParams{ + cloudflare.LoadBalancerUpdateParams{ DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), Name: cloudflare.F("www.example.com"), - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsAdaptiveRouting{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerUpdateParamsAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -388,9 +394,9 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }), Description: cloudflare.F("Load Balancer for www.example.com"), Enabled: cloudflare.F(true), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerUpdateParamsLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerUpdateParamsLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -406,7 +412,7 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }, }), Proxied: cloudflare.F(true), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -422,18 +428,18 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - Rules: cloudflare.F([]cloudflare.ZoneLoadBalancerUpdateParamsRule{{ + Rules: cloudflare.F([]cloudflare.LoadBalancerUpdateParamsRule{{ Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -447,9 +453,9 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -464,7 +470,7 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -480,17 +486,17 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -498,15 +504,15 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }, { Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -520,9 +526,9 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -537,7 +543,7 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -553,17 +559,17 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -571,15 +577,15 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }, { Condition: cloudflare.F("http.request.uri.path contains \"/testing\""), Disabled: cloudflare.F(true), - FixedResponse: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesFixedResponse{ + FixedResponse: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesFixedResponse{ ContentType: cloudflare.F("application/json"), Location: cloudflare.F("www.example.com"), MessageBody: cloudflare.F("Testing Hello"), StatusCode: cloudflare.F(int64(0)), }), Name: cloudflare.F("route the path /testing to testing datacenter."), - Overrides: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverrides{ - AdaptiveRouting: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ + Overrides: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverrides{ + AdaptiveRouting: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesAdaptiveRouting{ FailoverAcrossPools: cloudflare.F(true), }), CountryPools: cloudflare.F[any](map[string]interface{}{ @@ -593,9 +599,9 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { }), DefaultPools: cloudflare.F([]string{"17b5962d775c646f3f9725cbc7a53df4", "9290f38c5d07c2e2f4df57b1f61d4196", "00920f38ce07c2e2f4df50b1f61d4194"}), FallbackPool: cloudflare.F[any](map[string]interface{}{}), - LocationStrategy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategy{ - Mode: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), - PreferEcs: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), + LocationStrategy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategy{ + Mode: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyModeResolverIP), + PreferEcs: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesLocationStrategyPreferEcsAlways), }), PopPools: cloudflare.F[any](map[string]interface{}{ "LAX": map[string]interface{}{ @@ -610,7 +616,7 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "0": "00920f38ce07c2e2f4df50b1f61d4194", }, }), - RandomSteering: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesRandomSteering{ + RandomSteering: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesRandomSteering{ DefaultWeight: cloudflare.F(0.200000), PoolWeights: cloudflare.F[any](map[string]interface{}{ "9290f38c5d07c2e2f4df57b1f61d4196": 0.500000, @@ -626,33 +632,33 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsRulesOverridesSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), Terminates: cloudflare.F(true), }}), - SessionAffinity: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSessionAffinityCookie), - SessionAffinityAttributes: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSessionAffinityAttributes{ + SessionAffinity: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSessionAffinityCookie), + SessionAffinityAttributes: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSessionAffinityAttributes{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), RequireAllHeaders: cloudflare.F(true), - Samesite: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSamesiteAuto), - Secure: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSessionAffinityAttributesSecureAuto), - ZeroDowntimeFailover: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverSticky), + Samesite: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSessionAffinityAttributesSamesiteAuto), + Secure: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSessionAffinityAttributesSecureAuto), + ZeroDowntimeFailover: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(cloudflare.ZoneLoadBalancerUpdateParamsSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(cloudflare.LoadBalancerUpdateParamsSteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }, ) @@ -665,7 +671,8 @@ func TestZoneLoadBalancerUpdateWithOptionalParams(t *testing.T) { } } -func TestZoneLoadBalancerList(t *testing.T) { +func TestLoadBalancerList(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -676,10 +683,11 @@ func TestZoneLoadBalancerList(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.LoadBalancers.List(context.TODO(), "699d98642c564d2e855e9661899b7252") + _, err := client.LoadBalancers.List(context.TODO(), "699d98642c564d2e855e9661899b7252") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { @@ -689,7 +697,8 @@ func TestZoneLoadBalancerList(t *testing.T) { } } -func TestZoneLoadBalancerDelete(t *testing.T) { +func TestLoadBalancerDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -700,10 +709,11 @@ func TestZoneLoadBalancerDelete(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.LoadBalancers.Delete( + _, err := client.LoadBalancers.Delete( context.TODO(), "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", diff --git a/loadbalancermonitor.go b/loadbalancermonitor.go new file mode 100644 index 00000000000..16684ea3061 --- /dev/null +++ b/loadbalancermonitor.go @@ -0,0 +1,1011 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerMonitorService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerMonitorService] +// method instead. +type LoadBalancerMonitorService struct { + Options []option.RequestOption + Previews *LoadBalancerMonitorPreviewService + References *LoadBalancerMonitorReferenceService +} + +// NewLoadBalancerMonitorService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerMonitorService(opts ...option.RequestOption) (r *LoadBalancerMonitorService) { + r = &LoadBalancerMonitorService{} + r.Options = opts + r.Previews = NewLoadBalancerMonitorPreviewService(opts...) + r.References = NewLoadBalancerMonitorReferenceService(opts...) + return +} + +// List a single configured monitor for an account. +func (r *LoadBalancerMonitorService) Get(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerMonitorGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Modify a configured monitor. +func (r *LoadBalancerMonitorService) Update(ctx context.Context, accountIdentifier string, identifier string, body LoadBalancerMonitorUpdateParams, opts ...option.RequestOption) (res *LoadBalancerMonitorUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Delete a configured monitor. +func (r *LoadBalancerMonitorService) Delete(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerMonitorDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Create a configured monitor. +func (r *LoadBalancerMonitorService) AccountLoadBalancerMonitorsNewMonitor(ctx context.Context, accountIdentifier string, body LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParams, opts ...option.RequestOption) (res *LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// List configured monitors for an account. +func (r *LoadBalancerMonitorService) AccountLoadBalancerMonitorsListMonitors(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type LoadBalancerMonitorGetResponse struct { + Errors []LoadBalancerMonitorGetResponseError `json:"errors"` + Messages []LoadBalancerMonitorGetResponseMessage `json:"messages"` + Result LoadBalancerMonitorGetResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerMonitorGetResponseSuccess `json:"success"` + JSON loadBalancerMonitorGetResponseJSON `json:"-"` +} + +// loadBalancerMonitorGetResponseJSON contains the JSON metadata for the struct +// [LoadBalancerMonitorGetResponse] +type loadBalancerMonitorGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorGetResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorGetResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorGetResponseError] +type loadBalancerMonitorGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorGetResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorGetResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorGetResponseMessage] +type loadBalancerMonitorGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorGetResponseResult struct { + ID string `json:"id"` + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure bool `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown int64 `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp int64 `json:"consecutive_up"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Object description. + Description string `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody string `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes string `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects bool `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header interface{} `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval int64 `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method string `json:"method"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path string `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port int64 `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone string `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries int64 `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout int64 `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type LoadBalancerMonitorGetResponseResultType `json:"type"` + JSON loadBalancerMonitorGetResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorGetResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorGetResponseResult] +type loadBalancerMonitorGetResponseResultJSON struct { + ID apijson.Field + AllowInsecure apijson.Field + ConsecutiveDown apijson.Field + ConsecutiveUp apijson.Field + CreatedOn apijson.Field + Description apijson.Field + ExpectedBody apijson.Field + ExpectedCodes apijson.Field + FollowRedirects apijson.Field + Header apijson.Field + Interval apijson.Field + Method apijson.Field + ModifiedOn apijson.Field + Path apijson.Field + Port apijson.Field + ProbeZone apijson.Field + Retries apijson.Field + Timeout apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorGetResponseResultType string + +const ( + LoadBalancerMonitorGetResponseResultTypeHTTP LoadBalancerMonitorGetResponseResultType = "http" + LoadBalancerMonitorGetResponseResultTypeHTTPs LoadBalancerMonitorGetResponseResultType = "https" + LoadBalancerMonitorGetResponseResultTypeTcp LoadBalancerMonitorGetResponseResultType = "tcp" + LoadBalancerMonitorGetResponseResultTypeUdpIcmp LoadBalancerMonitorGetResponseResultType = "udp_icmp" + LoadBalancerMonitorGetResponseResultTypeIcmpPing LoadBalancerMonitorGetResponseResultType = "icmp_ping" + LoadBalancerMonitorGetResponseResultTypeSmtp LoadBalancerMonitorGetResponseResultType = "smtp" +) + +// Whether the API call was successful +type LoadBalancerMonitorGetResponseSuccess bool + +const ( + LoadBalancerMonitorGetResponseSuccessTrue LoadBalancerMonitorGetResponseSuccess = true +) + +type LoadBalancerMonitorUpdateResponse struct { + Errors []LoadBalancerMonitorUpdateResponseError `json:"errors"` + Messages []LoadBalancerMonitorUpdateResponseMessage `json:"messages"` + Result LoadBalancerMonitorUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerMonitorUpdateResponseSuccess `json:"success"` + JSON loadBalancerMonitorUpdateResponseJSON `json:"-"` +} + +// loadBalancerMonitorUpdateResponseJSON contains the JSON metadata for the struct +// [LoadBalancerMonitorUpdateResponse] +type loadBalancerMonitorUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorUpdateResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorUpdateResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorUpdateResponseError] +type loadBalancerMonitorUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorUpdateResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorUpdateResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorUpdateResponseMessage] +type loadBalancerMonitorUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorUpdateResponseResult struct { + ID string `json:"id"` + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure bool `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown int64 `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp int64 `json:"consecutive_up"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Object description. + Description string `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody string `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes string `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects bool `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header interface{} `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval int64 `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method string `json:"method"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path string `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port int64 `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone string `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries int64 `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout int64 `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type LoadBalancerMonitorUpdateResponseResultType `json:"type"` + JSON loadBalancerMonitorUpdateResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorUpdateResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorUpdateResponseResult] +type loadBalancerMonitorUpdateResponseResultJSON struct { + ID apijson.Field + AllowInsecure apijson.Field + ConsecutiveDown apijson.Field + ConsecutiveUp apijson.Field + CreatedOn apijson.Field + Description apijson.Field + ExpectedBody apijson.Field + ExpectedCodes apijson.Field + FollowRedirects apijson.Field + Header apijson.Field + Interval apijson.Field + Method apijson.Field + ModifiedOn apijson.Field + Path apijson.Field + Port apijson.Field + ProbeZone apijson.Field + Retries apijson.Field + Timeout apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorUpdateResponseResultType string + +const ( + LoadBalancerMonitorUpdateResponseResultTypeHTTP LoadBalancerMonitorUpdateResponseResultType = "http" + LoadBalancerMonitorUpdateResponseResultTypeHTTPs LoadBalancerMonitorUpdateResponseResultType = "https" + LoadBalancerMonitorUpdateResponseResultTypeTcp LoadBalancerMonitorUpdateResponseResultType = "tcp" + LoadBalancerMonitorUpdateResponseResultTypeUdpIcmp LoadBalancerMonitorUpdateResponseResultType = "udp_icmp" + LoadBalancerMonitorUpdateResponseResultTypeIcmpPing LoadBalancerMonitorUpdateResponseResultType = "icmp_ping" + LoadBalancerMonitorUpdateResponseResultTypeSmtp LoadBalancerMonitorUpdateResponseResultType = "smtp" +) + +// Whether the API call was successful +type LoadBalancerMonitorUpdateResponseSuccess bool + +const ( + LoadBalancerMonitorUpdateResponseSuccessTrue LoadBalancerMonitorUpdateResponseSuccess = true +) + +type LoadBalancerMonitorDeleteResponse struct { + Errors []LoadBalancerMonitorDeleteResponseError `json:"errors"` + Messages []LoadBalancerMonitorDeleteResponseMessage `json:"messages"` + Result LoadBalancerMonitorDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerMonitorDeleteResponseSuccess `json:"success"` + JSON loadBalancerMonitorDeleteResponseJSON `json:"-"` +} + +// loadBalancerMonitorDeleteResponseJSON contains the JSON metadata for the struct +// [LoadBalancerMonitorDeleteResponse] +type loadBalancerMonitorDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorDeleteResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorDeleteResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorDeleteResponseError] +type loadBalancerMonitorDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorDeleteResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorDeleteResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorDeleteResponseMessage] +type loadBalancerMonitorDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorDeleteResponseResult struct { + ID string `json:"id"` + JSON loadBalancerMonitorDeleteResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorDeleteResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerMonitorDeleteResponseResult] +type loadBalancerMonitorDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerMonitorDeleteResponseSuccess bool + +const ( + LoadBalancerMonitorDeleteResponseSuccessTrue LoadBalancerMonitorDeleteResponseSuccess = true +) + +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse struct { + Errors []LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseError `json:"errors"` + Messages []LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessage `json:"messages"` + Result LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseSuccess `json:"success"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseJSON contains +// the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse] +type loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseError] +type loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessage] +type loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResult struct { + ID string `json:"id"` + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure bool `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown int64 `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp int64 `json:"consecutive_up"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Object description. + Description string `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody string `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes string `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects bool `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header interface{} `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval int64 `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method string `json:"method"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path string `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port int64 `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone string `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries int64 `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout int64 `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType `json:"type"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResult] +type loadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultJSON struct { + ID apijson.Field + AllowInsecure apijson.Field + ConsecutiveDown apijson.Field + ConsecutiveUp apijson.Field + CreatedOn apijson.Field + Description apijson.Field + ExpectedBody apijson.Field + ExpectedCodes apijson.Field + FollowRedirects apijson.Field + Header apijson.Field + Interval apijson.Field + Method apijson.Field + ModifiedOn apijson.Field + Path apijson.Field + Port apijson.Field + ProbeZone apijson.Field + Retries apijson.Field + Timeout apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType string + +const ( + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeHTTP LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "http" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeHTTPs LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "https" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeTcp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "tcp" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeUdpIcmp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "udp_icmp" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeIcmpPing LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "icmp_ping" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultTypeSmtp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseResultType = "smtp" +) + +// Whether the API call was successful +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseSuccess bool + +const ( + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseSuccessTrue LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorResponseSuccess = true +) + +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse struct { + Errors []LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseError `json:"errors"` + Messages []LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessage `json:"messages"` + Result []LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResult `json:"result"` + ResultInfo LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseSuccess `json:"success"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseJSON contains +// the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse] +type loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseError] +type loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessage] +type loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResult struct { + ID string `json:"id"` + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure bool `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown int64 `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp int64 `json:"consecutive_up"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // Object description. + Description string `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody string `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes string `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects bool `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header interface{} `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval int64 `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method string `json:"method"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path string `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port int64 `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone string `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries int64 `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout int64 `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType `json:"type"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResult] +type loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultJSON struct { + ID apijson.Field + AllowInsecure apijson.Field + ConsecutiveDown apijson.Field + ConsecutiveUp apijson.Field + CreatedOn apijson.Field + Description apijson.Field + ExpectedBody apijson.Field + ExpectedCodes apijson.Field + FollowRedirects apijson.Field + Header apijson.Field + Interval apijson.Field + Method apijson.Field + ModifiedOn apijson.Field + Path apijson.Field + Port apijson.Field + ProbeZone apijson.Field + Retries apijson.Field + Timeout apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType string + +const ( + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeHTTP LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "http" + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeHTTPs LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "https" + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeTcp LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "tcp" + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeUdpIcmp LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "udp_icmp" + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeIcmpPing LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "icmp_ping" + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultTypeSmtp LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultType = "smtp" +) + +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfoJSON `json:"-"` +} + +// loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfo] +type loadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseSuccess bool + +const ( + LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseSuccessTrue LoadBalancerMonitorAccountLoadBalancerMonitorsListMonitorsResponseSuccess = true +) + +type LoadBalancerMonitorUpdateParams struct { + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure param.Field[bool] `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown param.Field[int64] `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp param.Field[int64] `json:"consecutive_up"` + // Object description. + Description param.Field[string] `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody param.Field[string] `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes param.Field[string] `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects param.Field[bool] `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header param.Field[interface{}] `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval param.Field[int64] `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method param.Field[string] `json:"method"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path param.Field[string] `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port param.Field[int64] `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone param.Field[string] `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries param.Field[int64] `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout param.Field[int64] `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type param.Field[LoadBalancerMonitorUpdateParamsType] `json:"type"` +} + +func (r LoadBalancerMonitorUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorUpdateParamsType string + +const ( + LoadBalancerMonitorUpdateParamsTypeHTTP LoadBalancerMonitorUpdateParamsType = "http" + LoadBalancerMonitorUpdateParamsTypeHTTPs LoadBalancerMonitorUpdateParamsType = "https" + LoadBalancerMonitorUpdateParamsTypeTcp LoadBalancerMonitorUpdateParamsType = "tcp" + LoadBalancerMonitorUpdateParamsTypeUdpIcmp LoadBalancerMonitorUpdateParamsType = "udp_icmp" + LoadBalancerMonitorUpdateParamsTypeIcmpPing LoadBalancerMonitorUpdateParamsType = "icmp_ping" + LoadBalancerMonitorUpdateParamsTypeSmtp LoadBalancerMonitorUpdateParamsType = "smtp" +) + +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParams struct { + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure param.Field[bool] `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown param.Field[int64] `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp param.Field[int64] `json:"consecutive_up"` + // Object description. + Description param.Field[string] `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody param.Field[string] `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes param.Field[string] `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects param.Field[bool] `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header param.Field[interface{}] `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval param.Field[int64] `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method param.Field[string] `json:"method"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path param.Field[string] `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port param.Field[int64] `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone param.Field[string] `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries param.Field[int64] `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout param.Field[int64] `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type param.Field[LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType] `json:"type"` +} + +func (r LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType string + +const ( + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeHTTP LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "http" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeHTTPs LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "https" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeTcp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "tcp" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeUdpIcmp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "udp_icmp" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeIcmpPing LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "icmp_ping" + LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeSmtp LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsType = "smtp" +) diff --git a/loadbalancermonitor_test.go b/loadbalancermonitor_test.go new file mode 100644 index 00000000000..b98aba8bd90 --- /dev/null +++ b/loadbalancermonitor_test.go @@ -0,0 +1,209 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerMonitorGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f1aba936b94213e5b8dca0c0dbf1f9cc", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerMonitorUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.Update( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f1aba936b94213e5b8dca0c0dbf1f9cc", + cloudflare.LoadBalancerMonitorUpdateParams{ + AllowInsecure: cloudflare.F(true), + ConsecutiveDown: cloudflare.F(int64(0)), + ConsecutiveUp: cloudflare.F(int64(0)), + Description: cloudflare.F("Login page monitor"), + ExpectedBody: cloudflare.F("alive"), + ExpectedCodes: cloudflare.F("2xx"), + FollowRedirects: cloudflare.F(true), + Header: cloudflare.F[any](map[string]interface{}{ + "Host": map[string]interface{}{ + "0": "example.com", + }, + "X-App-ID": map[string]interface{}{ + "0": "abc123", + }, + }), + Interval: cloudflare.F(int64(0)), + Method: cloudflare.F("GET"), + Path: cloudflare.F("/health"), + Port: cloudflare.F(int64(0)), + ProbeZone: cloudflare.F("example.com"), + Retries: cloudflare.F(int64(0)), + Timeout: cloudflare.F(int64(0)), + Type: cloudflare.F(cloudflare.LoadBalancerMonitorUpdateParamsTypeHTTPs), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerMonitorDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.Delete( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f1aba936b94213e5b8dca0c0dbf1f9cc", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.AccountLoadBalancerMonitorsNewMonitor( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParams{ + AllowInsecure: cloudflare.F(true), + ConsecutiveDown: cloudflare.F(int64(0)), + ConsecutiveUp: cloudflare.F(int64(0)), + Description: cloudflare.F("Login page monitor"), + ExpectedBody: cloudflare.F("alive"), + ExpectedCodes: cloudflare.F("2xx"), + FollowRedirects: cloudflare.F(true), + Header: cloudflare.F[any](map[string]interface{}{ + "Host": map[string]interface{}{ + "0": "example.com", + }, + "X-App-ID": map[string]interface{}{ + "0": "abc123", + }, + }), + Interval: cloudflare.F(int64(0)), + Method: cloudflare.F("GET"), + Path: cloudflare.F("/health"), + Port: cloudflare.F(int64(0)), + ProbeZone: cloudflare.F("example.com"), + Retries: cloudflare.F(int64(0)), + Timeout: cloudflare.F(int64(0)), + Type: cloudflare.F(cloudflare.LoadBalancerMonitorAccountLoadBalancerMonitorsNewMonitorParamsTypeHTTPs), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerMonitorAccountLoadBalancerMonitorsListMonitors(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.AccountLoadBalancerMonitorsListMonitors(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancermonitorpreview.go b/loadbalancermonitorpreview.go new file mode 100644 index 00000000000..0079beeb111 --- /dev/null +++ b/loadbalancermonitorpreview.go @@ -0,0 +1,203 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerMonitorPreviewService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewLoadBalancerMonitorPreviewService] method instead. +type LoadBalancerMonitorPreviewService struct { + Options []option.RequestOption +} + +// NewLoadBalancerMonitorPreviewService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewLoadBalancerMonitorPreviewService(opts ...option.RequestOption) (r *LoadBalancerMonitorPreviewService) { + r = &LoadBalancerMonitorPreviewService{} + r.Options = opts + return +} + +// Preview pools using the specified monitor with provided monitor details. The +// returned preview_id can be used in the preview endpoint to retrieve the results. +func (r *LoadBalancerMonitorPreviewService) AccountLoadBalancerMonitorsPreviewMonitor(ctx context.Context, accountIdentifier string, identifier string, body LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParams, opts ...option.RequestOption) (res *LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s/preview", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse struct { + Errors []LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseError `json:"errors"` + Messages []LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessage `json:"messages"` + Result LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseSuccess `json:"success"` + JSON loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseJSON `json:"-"` +} + +// loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse] +type loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseError] +type loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessage] +type loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResult struct { + // Monitored pool IDs mapped to their respective names. + Pools interface{} `json:"pools"` + PreviewID string `json:"preview_id"` + JSON loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResult] +type loadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResultJSON struct { + Pools apijson.Field + PreviewID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseSuccess bool + +const ( + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseSuccessTrue LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorResponseSuccess = true +) + +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParams struct { + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure param.Field[bool] `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown param.Field[int64] `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp param.Field[int64] `json:"consecutive_up"` + // Object description. + Description param.Field[string] `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody param.Field[string] `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes param.Field[string] `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects param.Field[bool] `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header param.Field[interface{}] `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval param.Field[int64] `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method param.Field[string] `json:"method"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path param.Field[string] `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port param.Field[int64] `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone param.Field[string] `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries param.Field[int64] `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout param.Field[int64] `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type param.Field[LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType] `json:"type"` +} + +func (r LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType string + +const ( + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeHTTP LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "http" + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeHTTPs LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "https" + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeTcp LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "tcp" + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeUdpIcmp LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "udp_icmp" + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeIcmpPing LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "icmp_ping" + LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeSmtp LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsType = "smtp" +) diff --git a/loadbalancermonitorpreview_test.go b/loadbalancermonitorpreview_test.go new file mode 100644 index 00000000000..0940c775aa8 --- /dev/null +++ b/loadbalancermonitorpreview_test.go @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.Previews.AccountLoadBalancerMonitorsPreviewMonitor( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f1aba936b94213e5b8dca0c0dbf1f9cc", + cloudflare.LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParams{ + AllowInsecure: cloudflare.F(true), + ConsecutiveDown: cloudflare.F(int64(0)), + ConsecutiveUp: cloudflare.F(int64(0)), + Description: cloudflare.F("Login page monitor"), + ExpectedBody: cloudflare.F("alive"), + ExpectedCodes: cloudflare.F("2xx"), + FollowRedirects: cloudflare.F(true), + Header: cloudflare.F[any](map[string]interface{}{ + "Host": map[string]interface{}{ + "0": "example.com", + }, + "X-App-ID": map[string]interface{}{ + "0": "abc123", + }, + }), + Interval: cloudflare.F(int64(0)), + Method: cloudflare.F("GET"), + Path: cloudflare.F("/health"), + Port: cloudflare.F(int64(0)), + ProbeZone: cloudflare.F("example.com"), + Retries: cloudflare.F(int64(0)), + Timeout: cloudflare.F(int64(0)), + Type: cloudflare.F(cloudflare.LoadBalancerMonitorPreviewAccountLoadBalancerMonitorsPreviewMonitorParamsTypeHTTPs), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancermonitorreference.go b/loadbalancermonitorreference.go new file mode 100644 index 00000000000..96914682655 --- /dev/null +++ b/loadbalancermonitorreference.go @@ -0,0 +1,174 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerMonitorReferenceService contains methods and other services that +// help with interacting with the cloudflare API. Note, unlike clients, this +// service does not read variables from the environment automatically. You should +// not instantiate this service directly, and instead use the +// [NewLoadBalancerMonitorReferenceService] method instead. +type LoadBalancerMonitorReferenceService struct { + Options []option.RequestOption +} + +// NewLoadBalancerMonitorReferenceService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewLoadBalancerMonitorReferenceService(opts ...option.RequestOption) (r *LoadBalancerMonitorReferenceService) { + r = &LoadBalancerMonitorReferenceService{} + r.Options = opts + return +} + +// Get the list of resources that reference the provided monitor. +func (r *LoadBalancerMonitorReferenceService) AccountLoadBalancerMonitorsListMonitorReferences(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s/references", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse struct { + Errors []LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseError `json:"errors"` + Messages []LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessage `json:"messages"` + // List of resources that reference a given monitor. + Result []LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResult `json:"result"` + ResultInfo LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseSuccess `json:"success"` + JSON loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseJSON `json:"-"` +} + +// loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse] +type loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseErrorJSON `json:"-"` +} + +// loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseError] +type loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessageJSON `json:"-"` +} + +// loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessage] +type loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResult struct { + ReferenceType LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceType `json:"reference_type"` + ResourceID string `json:"resource_id"` + ResourceName string `json:"resource_name"` + ResourceType string `json:"resource_type"` + JSON loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultJSON `json:"-"` +} + +// loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResult] +type loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultJSON struct { + ReferenceType apijson.Field + ResourceID apijson.Field + ResourceName apijson.Field + ResourceType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceType string + +const ( + LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceTypeStar LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceType = "*" + LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceTypeReferral LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceType = "referral" + LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceTypeReferrer LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultReferenceType = "referrer" +) + +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfoJSON `json:"-"` +} + +// loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfoJSON +// contains the JSON metadata for the struct +// [LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfo] +type loadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseSuccess bool + +const ( + LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseSuccessTrue LoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferencesResponseSuccess = true +) diff --git a/loadbalancermonitorreference_test.go b/loadbalancermonitorreference_test.go new file mode 100644 index 00000000000..3e444d0d611 --- /dev/null +++ b/loadbalancermonitorreference_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerMonitorReferenceAccountLoadBalancerMonitorsListMonitorReferences(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Monitors.References.AccountLoadBalancerMonitorsListMonitorReferences( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "f1aba936b94213e5b8dca0c0dbf1f9cc", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerpool.go b/loadbalancerpool.go new file mode 100644 index 00000000000..2f989f719dc --- /dev/null +++ b/loadbalancerpool.go @@ -0,0 +1,2902 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerPoolService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerPoolService] method +// instead. +type LoadBalancerPoolService struct { + Options []option.RequestOption + Health *LoadBalancerPoolHealthService + Previews *LoadBalancerPoolPreviewService + References *LoadBalancerPoolReferenceService +} + +// NewLoadBalancerPoolService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerPoolService(opts ...option.RequestOption) (r *LoadBalancerPoolService) { + r = &LoadBalancerPoolService{} + r.Options = opts + r.Health = NewLoadBalancerPoolHealthService(opts...) + r.Previews = NewLoadBalancerPoolPreviewService(opts...) + r.References = NewLoadBalancerPoolReferenceService(opts...) + return +} + +// Fetch a single configured pool. +func (r *LoadBalancerPoolService) Get(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerPoolGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Modify a configured pool. +func (r *LoadBalancerPoolService) Update(ctx context.Context, accountIdentifier string, identifier string, body LoadBalancerPoolUpdateParams, opts ...option.RequestOption) (res *LoadBalancerPoolUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &res, opts...) + return +} + +// Delete a configured pool. +func (r *LoadBalancerPoolService) Delete(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerPoolDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Create a new pool. +func (r *LoadBalancerPoolService) AccountLoadBalancerPoolsNewPool(ctx context.Context, accountIdentifier string, body LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParams, opts ...option.RequestOption) (res *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// List configured pools. +func (r *LoadBalancerPoolService) AccountLoadBalancerPoolsListPools(ctx context.Context, accountIdentifier string, query LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams, opts ...option.RequestOption) (res *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +// Apply changes to a number of existing pools, overwriting the supplied +// properties. Pools are ordered by ascending `name`. Returns the list of affected +// pools. Supports the standard pagination query parameters, either +// `limit`/`offset` or `per_page`/`page`. +func (r *LoadBalancerPoolService) AccountLoadBalancerPoolsPatchPools(ctx context.Context, accountIdentifier string, body LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParams, opts ...option.RequestOption) (res *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) + return +} + +type LoadBalancerPoolGetResponse struct { + Errors []LoadBalancerPoolGetResponseError `json:"errors"` + Messages []LoadBalancerPoolGetResponseMessage `json:"messages"` + Result LoadBalancerPoolGetResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolGetResponseSuccess `json:"success"` + JSON loadBalancerPoolGetResponseJSON `json:"-"` +} + +// loadBalancerPoolGetResponseJSON contains the JSON metadata for the struct +// [LoadBalancerPoolGetResponse] +type loadBalancerPoolGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolGetResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolGetResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerPoolGetResponseError] +type loadBalancerPoolGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolGetResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolGetResponseMessageJSON contains the JSON metadata for the struct +// [LoadBalancerPoolGetResponseMessage] +type loadBalancerPoolGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolGetResponseResult struct { + ID string `json:"id"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions []LoadBalancerPoolGetResponseResultCheckRegion `json:"check_regions,nullable"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // A human-readable description of the pool. + Description string `json:"description"` + // This field shows up only if the pool is disabled. This field is set with the + // time the pool was disabled at. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled bool `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude float64 `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding LoadBalancerPoolGetResponseResultLoadShedding `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude float64 `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins int64 `json:"minimum_origins"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor interface{} `json:"monitor"` + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name string `json:"name"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail string `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter LoadBalancerPoolGetResponseResultNotificationFilter `json:"notification_filter,nullable"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering LoadBalancerPoolGetResponseResultOriginSteering `json:"origin_steering"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins []LoadBalancerPoolGetResponseResultOrigin `json:"origins"` + JSON loadBalancerPoolGetResponseResultJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultJSON contains the JSON metadata for the struct +// [LoadBalancerPoolGetResponseResult] +type loadBalancerPoolGetResponseResultJSON struct { + ID apijson.Field + CheckRegions apijson.Field + CreatedOn apijson.Field + Description apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Latitude apijson.Field + LoadShedding apijson.Field + Longitude apijson.Field + MinimumOrigins apijson.Field + ModifiedOn apijson.Field + Monitor apijson.Field + Name apijson.Field + NotificationEmail apijson.Field + NotificationFilter apijson.Field + OriginSteering apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolGetResponseResultCheckRegion string + +const ( + LoadBalancerPoolGetResponseResultCheckRegionWnam LoadBalancerPoolGetResponseResultCheckRegion = "WNAM" + LoadBalancerPoolGetResponseResultCheckRegionEnam LoadBalancerPoolGetResponseResultCheckRegion = "ENAM" + LoadBalancerPoolGetResponseResultCheckRegionWeu LoadBalancerPoolGetResponseResultCheckRegion = "WEU" + LoadBalancerPoolGetResponseResultCheckRegionEeu LoadBalancerPoolGetResponseResultCheckRegion = "EEU" + LoadBalancerPoolGetResponseResultCheckRegionNsam LoadBalancerPoolGetResponseResultCheckRegion = "NSAM" + LoadBalancerPoolGetResponseResultCheckRegionSsam LoadBalancerPoolGetResponseResultCheckRegion = "SSAM" + LoadBalancerPoolGetResponseResultCheckRegionOc LoadBalancerPoolGetResponseResultCheckRegion = "OC" + LoadBalancerPoolGetResponseResultCheckRegionMe LoadBalancerPoolGetResponseResultCheckRegion = "ME" + LoadBalancerPoolGetResponseResultCheckRegionNaf LoadBalancerPoolGetResponseResultCheckRegion = "NAF" + LoadBalancerPoolGetResponseResultCheckRegionSaf LoadBalancerPoolGetResponseResultCheckRegion = "SAF" + LoadBalancerPoolGetResponseResultCheckRegionSas LoadBalancerPoolGetResponseResultCheckRegion = "SAS" + LoadBalancerPoolGetResponseResultCheckRegionSeas LoadBalancerPoolGetResponseResultCheckRegion = "SEAS" + LoadBalancerPoolGetResponseResultCheckRegionNeas LoadBalancerPoolGetResponseResultCheckRegion = "NEAS" + LoadBalancerPoolGetResponseResultCheckRegionAllRegions LoadBalancerPoolGetResponseResultCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolGetResponseResultLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent float64 `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicy `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent float64 `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy LoadBalancerPoolGetResponseResultLoadSheddingSessionPolicy `json:"session_policy"` + JSON loadBalancerPoolGetResponseResultLoadSheddingJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultLoadSheddingJSON contains the JSON metadata for +// the struct [LoadBalancerPoolGetResponseResultLoadShedding] +type loadBalancerPoolGetResponseResultLoadSheddingJSON struct { + DefaultPercent apijson.Field + DefaultPolicy apijson.Field + SessionPercent apijson.Field + SessionPolicy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultLoadShedding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicyRandom LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicyHash LoadBalancerPoolGetResponseResultLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolGetResponseResultLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolGetResponseResultLoadSheddingSessionPolicyHash LoadBalancerPoolGetResponseResultLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolGetResponseResultNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin LoadBalancerPoolGetResponseResultNotificationFilterOrigin `json:"origin,nullable"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool LoadBalancerPoolGetResponseResultNotificationFilterPool `json:"pool,nullable"` + JSON loadBalancerPoolGetResponseResultNotificationFilterJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultNotificationFilterJSON contains the JSON +// metadata for the struct [LoadBalancerPoolGetResponseResultNotificationFilter] +type loadBalancerPoolGetResponseResultNotificationFilterJSON struct { + Origin apijson.Field + Pool apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultNotificationFilter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolGetResponseResultNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolGetResponseResultNotificationFilterOriginJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultNotificationFilterOriginJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolGetResponseResultNotificationFilterOrigin] +type loadBalancerPoolGetResponseResultNotificationFilterOriginJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolGetResponseResultNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolGetResponseResultNotificationFilterPoolJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultNotificationFilterPoolJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolGetResponseResultNotificationFilterPool] +type loadBalancerPoolGetResponseResultNotificationFilterPoolJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultNotificationFilterPool) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolGetResponseResultOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy LoadBalancerPoolGetResponseResultOriginSteeringPolicy `json:"policy"` + JSON loadBalancerPoolGetResponseResultOriginSteeringJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultOriginSteeringJSON contains the JSON metadata +// for the struct [LoadBalancerPoolGetResponseResultOriginSteering] +type loadBalancerPoolGetResponseResultOriginSteeringJSON struct { + Policy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultOriginSteering) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolGetResponseResultOriginSteeringPolicy string + +const ( + LoadBalancerPoolGetResponseResultOriginSteeringPolicyRandom LoadBalancerPoolGetResponseResultOriginSteeringPolicy = "random" + LoadBalancerPoolGetResponseResultOriginSteeringPolicyHash LoadBalancerPoolGetResponseResultOriginSteeringPolicy = "hash" + LoadBalancerPoolGetResponseResultOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolGetResponseResultOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolGetResponseResultOriginSteeringPolicyLeastConnections LoadBalancerPoolGetResponseResultOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolGetResponseResultOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address string `json:"address"` + // This field shows up only if the origin is disabled. This field is set with the + // time the origin was disabled. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled bool `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header LoadBalancerPoolGetResponseResultOriginsHeader `json:"header"` + // A human-identifiable name for the origin. + Name string `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID string `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight float64 `json:"weight"` + JSON loadBalancerPoolGetResponseResultOriginJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultOriginJSON contains the JSON metadata for the +// struct [LoadBalancerPoolGetResponseResultOrigin] +type loadBalancerPoolGetResponseResultOriginJSON struct { + Address apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Header apijson.Field + Name apijson.Field + VirtualNetworkID apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolGetResponseResultOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host []string `json:"Host"` + JSON loadBalancerPoolGetResponseResultOriginsHeaderJSON `json:"-"` +} + +// loadBalancerPoolGetResponseResultOriginsHeaderJSON contains the JSON metadata +// for the struct [LoadBalancerPoolGetResponseResultOriginsHeader] +type loadBalancerPoolGetResponseResultOriginsHeaderJSON struct { + Host apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolGetResponseResultOriginsHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolGetResponseSuccess bool + +const ( + LoadBalancerPoolGetResponseSuccessTrue LoadBalancerPoolGetResponseSuccess = true +) + +type LoadBalancerPoolUpdateResponse struct { + Errors []LoadBalancerPoolUpdateResponseError `json:"errors"` + Messages []LoadBalancerPoolUpdateResponseMessage `json:"messages"` + Result LoadBalancerPoolUpdateResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolUpdateResponseSuccess `json:"success"` + JSON loadBalancerPoolUpdateResponseJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseJSON contains the JSON metadata for the struct +// [LoadBalancerPoolUpdateResponse] +type loadBalancerPoolUpdateResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolUpdateResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolUpdateResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerPoolUpdateResponseError] +type loadBalancerPoolUpdateResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolUpdateResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolUpdateResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerPoolUpdateResponseMessage] +type loadBalancerPoolUpdateResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolUpdateResponseResult struct { + ID string `json:"id"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions []LoadBalancerPoolUpdateResponseResultCheckRegion `json:"check_regions,nullable"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // A human-readable description of the pool. + Description string `json:"description"` + // This field shows up only if the pool is disabled. This field is set with the + // time the pool was disabled at. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled bool `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude float64 `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding LoadBalancerPoolUpdateResponseResultLoadShedding `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude float64 `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins int64 `json:"minimum_origins"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor interface{} `json:"monitor"` + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name string `json:"name"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail string `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter LoadBalancerPoolUpdateResponseResultNotificationFilter `json:"notification_filter,nullable"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering LoadBalancerPoolUpdateResponseResultOriginSteering `json:"origin_steering"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins []LoadBalancerPoolUpdateResponseResultOrigin `json:"origins"` + JSON loadBalancerPoolUpdateResponseResultJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerPoolUpdateResponseResult] +type loadBalancerPoolUpdateResponseResultJSON struct { + ID apijson.Field + CheckRegions apijson.Field + CreatedOn apijson.Field + Description apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Latitude apijson.Field + LoadShedding apijson.Field + Longitude apijson.Field + MinimumOrigins apijson.Field + ModifiedOn apijson.Field + Monitor apijson.Field + Name apijson.Field + NotificationEmail apijson.Field + NotificationFilter apijson.Field + OriginSteering apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolUpdateResponseResultCheckRegion string + +const ( + LoadBalancerPoolUpdateResponseResultCheckRegionWnam LoadBalancerPoolUpdateResponseResultCheckRegion = "WNAM" + LoadBalancerPoolUpdateResponseResultCheckRegionEnam LoadBalancerPoolUpdateResponseResultCheckRegion = "ENAM" + LoadBalancerPoolUpdateResponseResultCheckRegionWeu LoadBalancerPoolUpdateResponseResultCheckRegion = "WEU" + LoadBalancerPoolUpdateResponseResultCheckRegionEeu LoadBalancerPoolUpdateResponseResultCheckRegion = "EEU" + LoadBalancerPoolUpdateResponseResultCheckRegionNsam LoadBalancerPoolUpdateResponseResultCheckRegion = "NSAM" + LoadBalancerPoolUpdateResponseResultCheckRegionSsam LoadBalancerPoolUpdateResponseResultCheckRegion = "SSAM" + LoadBalancerPoolUpdateResponseResultCheckRegionOc LoadBalancerPoolUpdateResponseResultCheckRegion = "OC" + LoadBalancerPoolUpdateResponseResultCheckRegionMe LoadBalancerPoolUpdateResponseResultCheckRegion = "ME" + LoadBalancerPoolUpdateResponseResultCheckRegionNaf LoadBalancerPoolUpdateResponseResultCheckRegion = "NAF" + LoadBalancerPoolUpdateResponseResultCheckRegionSaf LoadBalancerPoolUpdateResponseResultCheckRegion = "SAF" + LoadBalancerPoolUpdateResponseResultCheckRegionSas LoadBalancerPoolUpdateResponseResultCheckRegion = "SAS" + LoadBalancerPoolUpdateResponseResultCheckRegionSeas LoadBalancerPoolUpdateResponseResultCheckRegion = "SEAS" + LoadBalancerPoolUpdateResponseResultCheckRegionNeas LoadBalancerPoolUpdateResponseResultCheckRegion = "NEAS" + LoadBalancerPoolUpdateResponseResultCheckRegionAllRegions LoadBalancerPoolUpdateResponseResultCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolUpdateResponseResultLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent float64 `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicy `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent float64 `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy LoadBalancerPoolUpdateResponseResultLoadSheddingSessionPolicy `json:"session_policy"` + JSON loadBalancerPoolUpdateResponseResultLoadSheddingJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultLoadSheddingJSON contains the JSON metadata +// for the struct [LoadBalancerPoolUpdateResponseResultLoadShedding] +type loadBalancerPoolUpdateResponseResultLoadSheddingJSON struct { + DefaultPercent apijson.Field + DefaultPolicy apijson.Field + SessionPercent apijson.Field + SessionPolicy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultLoadShedding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicyRandom LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicyHash LoadBalancerPoolUpdateResponseResultLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolUpdateResponseResultLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolUpdateResponseResultLoadSheddingSessionPolicyHash LoadBalancerPoolUpdateResponseResultLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolUpdateResponseResultNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin LoadBalancerPoolUpdateResponseResultNotificationFilterOrigin `json:"origin,nullable"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool LoadBalancerPoolUpdateResponseResultNotificationFilterPool `json:"pool,nullable"` + JSON loadBalancerPoolUpdateResponseResultNotificationFilterJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultNotificationFilterJSON contains the JSON +// metadata for the struct [LoadBalancerPoolUpdateResponseResultNotificationFilter] +type loadBalancerPoolUpdateResponseResultNotificationFilterJSON struct { + Origin apijson.Field + Pool apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultNotificationFilter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolUpdateResponseResultNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolUpdateResponseResultNotificationFilterOriginJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultNotificationFilterOriginJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolUpdateResponseResultNotificationFilterOrigin] +type loadBalancerPoolUpdateResponseResultNotificationFilterOriginJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolUpdateResponseResultNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolUpdateResponseResultNotificationFilterPoolJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultNotificationFilterPoolJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolUpdateResponseResultNotificationFilterPool] +type loadBalancerPoolUpdateResponseResultNotificationFilterPoolJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultNotificationFilterPool) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolUpdateResponseResultOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy `json:"policy"` + JSON loadBalancerPoolUpdateResponseResultOriginSteeringJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultOriginSteeringJSON contains the JSON +// metadata for the struct [LoadBalancerPoolUpdateResponseResultOriginSteering] +type loadBalancerPoolUpdateResponseResultOriginSteeringJSON struct { + Policy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultOriginSteering) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy string + +const ( + LoadBalancerPoolUpdateResponseResultOriginSteeringPolicyRandom LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy = "random" + LoadBalancerPoolUpdateResponseResultOriginSteeringPolicyHash LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy = "hash" + LoadBalancerPoolUpdateResponseResultOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolUpdateResponseResultOriginSteeringPolicyLeastConnections LoadBalancerPoolUpdateResponseResultOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolUpdateResponseResultOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address string `json:"address"` + // This field shows up only if the origin is disabled. This field is set with the + // time the origin was disabled. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled bool `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header LoadBalancerPoolUpdateResponseResultOriginsHeader `json:"header"` + // A human-identifiable name for the origin. + Name string `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID string `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight float64 `json:"weight"` + JSON loadBalancerPoolUpdateResponseResultOriginJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultOriginJSON contains the JSON metadata for +// the struct [LoadBalancerPoolUpdateResponseResultOrigin] +type loadBalancerPoolUpdateResponseResultOriginJSON struct { + Address apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Header apijson.Field + Name apijson.Field + VirtualNetworkID apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolUpdateResponseResultOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host []string `json:"Host"` + JSON loadBalancerPoolUpdateResponseResultOriginsHeaderJSON `json:"-"` +} + +// loadBalancerPoolUpdateResponseResultOriginsHeaderJSON contains the JSON metadata +// for the struct [LoadBalancerPoolUpdateResponseResultOriginsHeader] +type loadBalancerPoolUpdateResponseResultOriginsHeaderJSON struct { + Host apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolUpdateResponseResultOriginsHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolUpdateResponseSuccess bool + +const ( + LoadBalancerPoolUpdateResponseSuccessTrue LoadBalancerPoolUpdateResponseSuccess = true +) + +type LoadBalancerPoolDeleteResponse struct { + Errors []LoadBalancerPoolDeleteResponseError `json:"errors"` + Messages []LoadBalancerPoolDeleteResponseMessage `json:"messages"` + Result LoadBalancerPoolDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolDeleteResponseSuccess `json:"success"` + JSON loadBalancerPoolDeleteResponseJSON `json:"-"` +} + +// loadBalancerPoolDeleteResponseJSON contains the JSON metadata for the struct +// [LoadBalancerPoolDeleteResponse] +type loadBalancerPoolDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolDeleteResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolDeleteResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerPoolDeleteResponseError] +type loadBalancerPoolDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolDeleteResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolDeleteResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerPoolDeleteResponseMessage] +type loadBalancerPoolDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolDeleteResponseResult struct { + ID string `json:"id"` + JSON loadBalancerPoolDeleteResponseResultJSON `json:"-"` +} + +// loadBalancerPoolDeleteResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerPoolDeleteResponseResult] +type loadBalancerPoolDeleteResponseResultJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolDeleteResponseSuccess bool + +const ( + LoadBalancerPoolDeleteResponseSuccessTrue LoadBalancerPoolDeleteResponseSuccess = true +) + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse struct { + Errors []LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseError `json:"errors"` + Messages []LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessage `json:"messages"` + Result LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseSuccess `json:"success"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseErrorJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseError] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessageJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessage] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResult struct { + ID string `json:"id"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions []LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion `json:"check_regions,nullable"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // A human-readable description of the pool. + Description string `json:"description"` + // This field shows up only if the pool is disabled. This field is set with the + // time the pool was disabled at. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled bool `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude float64 `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadShedding `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude float64 `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins int64 `json:"minimum_origins"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor interface{} `json:"monitor"` + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name string `json:"name"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail string `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilter `json:"notification_filter,nullable"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteering `json:"origin_steering"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins []LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOrigin `json:"origins"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResult] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultJSON struct { + ID apijson.Field + CheckRegions apijson.Field + CreatedOn apijson.Field + Description apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Latitude apijson.Field + LoadShedding apijson.Field + Longitude apijson.Field + MinimumOrigins apijson.Field + ModifiedOn apijson.Field + Monitor apijson.Field + Name apijson.Field + NotificationEmail apijson.Field + NotificationFilter apijson.Field + OriginSteering apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionWnam LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "WNAM" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionEnam LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "ENAM" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionWeu LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "WEU" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionEeu LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "EEU" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionNsam LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "NSAM" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionSsam LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "SSAM" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionOc LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "OC" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionMe LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "ME" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionNaf LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "NAF" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionSaf LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "SAF" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionSas LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "SAS" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionSeas LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "SEAS" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionNeas LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "NEAS" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegionAllRegions LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent float64 `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicy `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent float64 `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingSessionPolicy `json:"session_policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadShedding] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingJSON struct { + DefaultPercent apijson.Field + DefaultPolicy apijson.Field + SessionPercent apijson.Field + SessionPolicy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadShedding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingSessionPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOrigin `json:"origin,nullable"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPool `json:"pool,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilter] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterJSON struct { + Origin apijson.Field + Pool apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOriginJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOriginJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPoolJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPoolJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPool] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPoolJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultNotificationFilterPool) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy `json:"policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteering] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringJSON struct { + Policy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteering) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy = "hash" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicyLeastConnections LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address string `json:"address"` + // This field shows up only if the origin is disabled. This field is set with the + // time the origin was disabled. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled bool `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeader `json:"header"` + // A human-identifiable name for the origin. + Name string `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID string `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight float64 `json:"weight"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginJSON struct { + Address apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Header apijson.Field + Name apijson.Field + VirtualNetworkID apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host []string `json:"Host"` + JSON loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeaderJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeaderJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeader] +type loadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeaderJSON struct { + Host apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseResultOriginsHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseSuccess bool + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseSuccessTrue LoadBalancerPoolAccountLoadBalancerPoolsNewPoolResponseSuccess = true +) + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse struct { + Errors []LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseError `json:"errors"` + Messages []LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessage `json:"messages"` + Result []LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResult `json:"result"` + ResultInfo LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseSuccess `json:"success"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseErrorJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseError] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessageJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessage] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResult struct { + ID string `json:"id"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions []LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion `json:"check_regions,nullable"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // A human-readable description of the pool. + Description string `json:"description"` + // This field shows up only if the pool is disabled. This field is set with the + // time the pool was disabled at. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled bool `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude float64 `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadShedding `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude float64 `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins int64 `json:"minimum_origins"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor interface{} `json:"monitor"` + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name string `json:"name"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail string `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilter `json:"notification_filter,nullable"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteering `json:"origin_steering"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins []LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOrigin `json:"origins"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResult] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultJSON struct { + ID apijson.Field + CheckRegions apijson.Field + CreatedOn apijson.Field + Description apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Latitude apijson.Field + LoadShedding apijson.Field + Longitude apijson.Field + MinimumOrigins apijson.Field + ModifiedOn apijson.Field + Monitor apijson.Field + Name apijson.Field + NotificationEmail apijson.Field + NotificationFilter apijson.Field + OriginSteering apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionWnam LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "WNAM" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionEnam LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "ENAM" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionWeu LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "WEU" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionEeu LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "EEU" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionNsam LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "NSAM" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionSsam LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "SSAM" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionOc LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "OC" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionMe LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "ME" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionNaf LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "NAF" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionSaf LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "SAF" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionSas LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "SAS" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionSeas LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "SEAS" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionNeas LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "NEAS" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegionAllRegions LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent float64 `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicy `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent float64 `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingSessionPolicy `json:"session_policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadShedding] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingJSON struct { + DefaultPercent apijson.Field + DefaultPolicy apijson.Field + SessionPercent apijson.Field + SessionPolicy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadShedding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingSessionPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOrigin `json:"origin,nullable"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPool `json:"pool,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilter] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterJSON struct { + Origin apijson.Field + Pool apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOriginJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOriginJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPoolJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPoolJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPool] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPoolJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultNotificationFilterPool) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy `json:"policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteering] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringJSON struct { + Policy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteering) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy = "hash" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicyLeastConnections LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address string `json:"address"` + // This field shows up only if the origin is disabled. This field is set with the + // time the origin was disabled. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled bool `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeader `json:"header"` + // A human-identifiable name for the origin. + Name string `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID string `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight float64 `json:"weight"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginJSON struct { + Address apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Header apijson.Field + Name apijson.Field + VirtualNetworkID apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host []string `json:"Host"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeaderJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeaderJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeader] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeaderJSON struct { + Host apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultOriginsHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfoJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfoJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfo] +type loadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseSuccess bool + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseSuccessTrue LoadBalancerPoolAccountLoadBalancerPoolsListPoolsResponseSuccess = true +) + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse struct { + Errors []LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseError `json:"errors"` + Messages []LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessage `json:"messages"` + Result []LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResult `json:"result"` + ResultInfo LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseSuccess `json:"success"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseJSON contains the JSON +// metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseErrorJSON contains the +// JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseError] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessageJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessage] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResult struct { + ID string `json:"id"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions []LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion `json:"check_regions,nullable"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // A human-readable description of the pool. + Description string `json:"description"` + // This field shows up only if the pool is disabled. This field is set with the + // time the pool was disabled at. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled bool `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude float64 `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadShedding `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude float64 `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins int64 `json:"minimum_origins"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor interface{} `json:"monitor"` + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name string `json:"name"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail string `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilter `json:"notification_filter,nullable"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteering `json:"origin_steering"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins []LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOrigin `json:"origins"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResult] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultJSON struct { + ID apijson.Field + CheckRegions apijson.Field + CreatedOn apijson.Field + Description apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Latitude apijson.Field + LoadShedding apijson.Field + Longitude apijson.Field + MinimumOrigins apijson.Field + ModifiedOn apijson.Field + Monitor apijson.Field + Name apijson.Field + NotificationEmail apijson.Field + NotificationFilter apijson.Field + OriginSteering apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionWnam LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "WNAM" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionEnam LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "ENAM" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionWeu LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "WEU" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionEeu LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "EEU" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionNsam LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "NSAM" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionSsam LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "SSAM" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionOc LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "OC" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionMe LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "ME" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionNaf LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "NAF" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionSaf LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "SAF" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionSas LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "SAS" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionSeas LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "SEAS" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionNeas LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "NEAS" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegionAllRegions LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent float64 `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicy `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent float64 `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingSessionPolicy `json:"session_policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadShedding] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingJSON struct { + DefaultPercent apijson.Field + DefaultPolicy apijson.Field + SessionPercent apijson.Field + SessionPolicy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadShedding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingSessionPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOrigin `json:"origin,nullable"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPool `json:"pool,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilter] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterJSON struct { + Origin apijson.Field + Pool apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOriginJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOriginJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable bool `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy bool `json:"healthy,nullable"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPoolJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPoolJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPool] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPoolJSON struct { + Disable apijson.Field + Healthy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultNotificationFilterPool) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy `json:"policy"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteering] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringJSON struct { + Policy apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteering) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy = "hash" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicyLeastConnections LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address string `json:"address"` + // This field shows up only if the origin is disabled. This field is set with the + // time the origin was disabled. + DisabledAt time.Time `json:"disabled_at" format:"date-time"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled bool `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeader `json:"header"` + // A human-identifiable name for the origin. + Name string `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID string `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight float64 `json:"weight"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOrigin] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginJSON struct { + Address apijson.Field + DisabledAt apijson.Field + Enabled apijson.Field + Header apijson.Field + Name apijson.Field + VirtualNetworkID apijson.Field + Weight apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host []string `json:"Host"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeaderJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeaderJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeader] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeaderJSON struct { + Host apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultOriginsHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfoJSON `json:"-"` +} + +// loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfoJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfo] +type loadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseSuccess bool + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseSuccessTrue LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsResponseSuccess = true +) + +type LoadBalancerPoolUpdateParams struct { + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name param.Field[string] `json:"name,required"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins param.Field[[]LoadBalancerPoolUpdateParamsOrigin] `json:"origins,required"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + CheckRegions param.Field[[]LoadBalancerPoolUpdateParamsCheckRegion] `json:"check_regions"` + // A human-readable description of the pool. + Description param.Field[string] `json:"description"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled param.Field[bool] `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude param.Field[float64] `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding param.Field[LoadBalancerPoolUpdateParamsLoadShedding] `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude param.Field[float64] `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins param.Field[int64] `json:"minimum_origins"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor param.Field[interface{}] `json:"monitor"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail param.Field[string] `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter param.Field[LoadBalancerPoolUpdateParamsNotificationFilter] `json:"notification_filter"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering param.Field[LoadBalancerPoolUpdateParamsOriginSteering] `json:"origin_steering"` +} + +func (r LoadBalancerPoolUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type LoadBalancerPoolUpdateParamsOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address param.Field[string] `json:"address"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled param.Field[bool] `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header param.Field[LoadBalancerPoolUpdateParamsOriginsHeader] `json:"header"` + // A human-identifiable name for the origin. + Name param.Field[string] `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID param.Field[string] `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight param.Field[float64] `json:"weight"` +} + +func (r LoadBalancerPoolUpdateParamsOrigin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolUpdateParamsOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host param.Field[[]string] `json:"Host"` +} + +func (r LoadBalancerPoolUpdateParamsOriginsHeader) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, +// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, +// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: +// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all +// regions (ENTERPRISE customers only). +type LoadBalancerPoolUpdateParamsCheckRegion string + +const ( + LoadBalancerPoolUpdateParamsCheckRegionWnam LoadBalancerPoolUpdateParamsCheckRegion = "WNAM" + LoadBalancerPoolUpdateParamsCheckRegionEnam LoadBalancerPoolUpdateParamsCheckRegion = "ENAM" + LoadBalancerPoolUpdateParamsCheckRegionWeu LoadBalancerPoolUpdateParamsCheckRegion = "WEU" + LoadBalancerPoolUpdateParamsCheckRegionEeu LoadBalancerPoolUpdateParamsCheckRegion = "EEU" + LoadBalancerPoolUpdateParamsCheckRegionNsam LoadBalancerPoolUpdateParamsCheckRegion = "NSAM" + LoadBalancerPoolUpdateParamsCheckRegionSsam LoadBalancerPoolUpdateParamsCheckRegion = "SSAM" + LoadBalancerPoolUpdateParamsCheckRegionOc LoadBalancerPoolUpdateParamsCheckRegion = "OC" + LoadBalancerPoolUpdateParamsCheckRegionMe LoadBalancerPoolUpdateParamsCheckRegion = "ME" + LoadBalancerPoolUpdateParamsCheckRegionNaf LoadBalancerPoolUpdateParamsCheckRegion = "NAF" + LoadBalancerPoolUpdateParamsCheckRegionSaf LoadBalancerPoolUpdateParamsCheckRegion = "SAF" + LoadBalancerPoolUpdateParamsCheckRegionSas LoadBalancerPoolUpdateParamsCheckRegion = "SAS" + LoadBalancerPoolUpdateParamsCheckRegionSeas LoadBalancerPoolUpdateParamsCheckRegion = "SEAS" + LoadBalancerPoolUpdateParamsCheckRegionNeas LoadBalancerPoolUpdateParamsCheckRegion = "NEAS" + LoadBalancerPoolUpdateParamsCheckRegionAllRegions LoadBalancerPoolUpdateParamsCheckRegion = "ALL_REGIONS" +) + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolUpdateParamsLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent param.Field[float64] `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy param.Field[LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy] `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent param.Field[float64] `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy param.Field[LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy] `json:"session_policy"` +} + +func (r LoadBalancerPoolUpdateParamsLoadShedding) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicyRandom LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicyHash LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicyHash LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolUpdateParamsNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin param.Field[LoadBalancerPoolUpdateParamsNotificationFilterOrigin] `json:"origin"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool param.Field[LoadBalancerPoolUpdateParamsNotificationFilterPool] `json:"pool"` +} + +func (r LoadBalancerPoolUpdateParamsNotificationFilter) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolUpdateParamsNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable param.Field[bool] `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy param.Field[bool] `json:"healthy"` +} + +func (r LoadBalancerPoolUpdateParamsNotificationFilterOrigin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolUpdateParamsNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable param.Field[bool] `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy param.Field[bool] `json:"healthy"` +} + +func (r LoadBalancerPoolUpdateParamsNotificationFilterPool) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolUpdateParamsOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy param.Field[LoadBalancerPoolUpdateParamsOriginSteeringPolicy] `json:"policy"` +} + +func (r LoadBalancerPoolUpdateParamsOriginSteering) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolUpdateParamsOriginSteeringPolicy string + +const ( + LoadBalancerPoolUpdateParamsOriginSteeringPolicyRandom LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "random" + LoadBalancerPoolUpdateParamsOriginSteeringPolicyHash LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "hash" + LoadBalancerPoolUpdateParamsOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolUpdateParamsOriginSteeringPolicyLeastConnections LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParams struct { + // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and + // underscores are allowed. + Name param.Field[string] `json:"name,required"` + // The list of origins within this pool. Traffic directed at this pool is balanced + // across all currently healthy origins, provided the pool itself is healthy. + Origins param.Field[[]LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOrigin] `json:"origins,required"` + // A human-readable description of the pool. + Description param.Field[string] `json:"description"` + // Whether to enable (the default) or disable this pool. Disabled pools will not + // receive traffic and are excluded from health checks. Disabling a pool will cause + // any load balancers using it to failover to the next pool (if any). + Enabled param.Field[bool] `json:"enabled"` + // The latitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, longitude must also be set. + Latitude param.Field[float64] `json:"latitude"` + // Configures load shedding policies and percentages for the pool. + LoadShedding param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadShedding] `json:"load_shedding"` + // The longitude of the data center containing the origins used in this pool in + // decimal degrees. If this is set, latitude must also be set. + Longitude param.Field[float64] `json:"longitude"` + // The minimum number of origins that must be healthy for this pool to serve + // traffic. If the number of healthy origins falls below this number, the pool will + // be marked unhealthy and will failover to the next available pool. + MinimumOrigins param.Field[int64] `json:"minimum_origins"` + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor param.Field[interface{}] `json:"monitor"` + // This field is now deprecated. It has been moved to Cloudflare's Centralized + // Notification service + // https://developers.cloudflare.com/fundamentals/notifications/. The email address + // to send health status notifications to. This can be an individual mailbox or a + // mailing list. Multiple emails can be supplied as a comma delimited list. + NotificationEmail param.Field[string] `json:"notification_email"` + // Filter pool and origin health notifications by resource type or health status. + // Use null to reset. + NotificationFilter param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilter] `json:"notification_filter"` + // Configures origin steering for the pool. Controls how origins are selected for + // new sessions and traffic without session affinity. + OriginSteering param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteering] `json:"origin_steering"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOrigin struct { + // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + // hostname. Hostnames entered here should resolve directly to the origin, and not + // be a hostname proxied by Cloudflare. To set an internal/reserved address, + // virtual_network_id must also be set. + Address param.Field[string] `json:"address"` + // Whether to enable (the default) this origin within the pool. Disabled origins + // will not receive traffic and are excluded from health checks. The origin will + // only be disabled for the current pool. + Enabled param.Field[bool] `json:"enabled"` + // The request header is used to pass additional information with an HTTP request. + // Currently supported header is 'Host'. + Header param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader] `json:"header"` + // A human-identifiable name for the origin. + Name param.Field[string] `json:"name"` + // The virtual network subnet ID the origin belongs in. Virtual network must also + // belong to the account. + VirtualNetworkID param.Field[string] `json:"virtual_network_id"` + // The weight of this origin relative to other origins in the pool. Based on the + // configured weight the total traffic is distributed among origins within the + // pool. + // + // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + // origin's outstanding requests. + // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + // open connections. + Weight param.Field[float64] `json:"weight"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOrigin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The request header is used to pass additional information with an HTTP request. +// Currently supported header is 'Host'. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader struct { + // The 'Host' header allows to override the hostname set in the HTTP request. + // Current support is 1 'Host' header override per origin. + Host param.Field[[]string] `json:"Host"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configures load shedding policies and percentages for the pool. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadShedding struct { + // The percent of traffic to shed from the pool, according to the default policy. + // Applies to new sessions and traffic without session affinity. + DefaultPercent param.Field[float64] `json:"default_percent"` + // The default policy to use when load shedding. A random policy randomly sheds a + // given percent of requests. A hash policy computes a hash over the + // CF-Connecting-IP address and sheds all requests originating from a percent of + // IPs. + DefaultPolicy param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicy] `json:"default_policy"` + // The percent of existing sessions to shed from the pool, according to the session + // policy. + SessionPercent param.Field[float64] `json:"session_percent"` + // Only the hash policy is supported for existing sessions (to avoid exponential + // decay). + SessionPolicy param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingSessionPolicy] `json:"session_policy"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadShedding) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The default policy to use when load shedding. A random policy randomly sheds a +// given percent of requests. A hash policy computes a hash over the +// CF-Connecting-IP address and sheds all requests originating from a percent of +// IPs. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicy = "hash" +) + +// Only the hash policy is supported for existing sessions (to avoid exponential +// decay). +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingSessionPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingSessionPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingSessionPolicy = "hash" +) + +// Filter pool and origin health notifications by resource type or health status. +// Use null to reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilter struct { + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Origin param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterOrigin] `json:"origin"` + // Filter options for a particular resource type (pool or origin). Use null to + // reset. + Pool param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterPool] `json:"pool"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilter) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterOrigin struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable param.Field[bool] `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy param.Field[bool] `json:"healthy"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterOrigin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Filter options for a particular resource type (pool or origin). Use null to +// reset. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterPool struct { + // If set true, disable notifications for this type of resource (pool or origin). + Disable param.Field[bool] `json:"disable"` + // If present, send notifications only for this health status (e.g. false for only + // DOWN events). Use null to reset (all events). + Healthy param.Field[bool] `json:"healthy"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterPool) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configures origin steering for the pool. Controls how origins are selected for +// new sessions and traffic without session affinity. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteering struct { + // The type of origin steering policy to use. + // + // - `"random"`: Select an origin randomly. + // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + // address. + // - `"least_outstanding_requests"`: Select an origin by taking into consideration + // origin weights, as well as each origin's number of outstanding requests. + // Origins with more pending requests are weighted proportionately less relative + // to others. + // - `"least_connections"`: Select an origin by taking into consideration origin + // weights, as well as each origin's number of open connections. Origins with + // more open connections are weighted proportionately less relative to others. + // Supported for HTTP/1 and HTTP/2 connections. + Policy param.Field[LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy] `json:"policy"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteering) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The type of origin steering policy to use. +// +// - `"random"`: Select an origin randomly. +// - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP +// address. +// - `"least_outstanding_requests"`: Select an origin by taking into consideration +// origin weights, as well as each origin's number of outstanding requests. +// Origins with more pending requests are weighted proportionately less relative +// to others. +// - `"least_connections"`: Select an origin by taking into consideration origin +// weights, as well as each origin's number of open connections. Origins with +// more open connections are weighted proportionately less relative to others. +// Supported for HTTP/1 and HTTP/2 connections. +type LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicyRandom LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy = "random" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicyHash LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy = "hash" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy = "least_outstanding_requests" + LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicyLeastConnections LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicy = "least_connections" +) + +type LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams struct { + // The ID of the Monitor to use for checking the health of origins within this + // pool. + Monitor param.Field[interface{}] `query:"monitor"` +} + +// URLQuery serializes [LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams]'s +// query parameters as `url.Values`. +func (r LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParams struct { + // The email address to send health status notifications to. This field is now + // deprecated in favor of Cloudflare Notifications for Load Balancing, so only + // resetting this field with an empty string `""` is accepted. + NotificationEmail param.Field[LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParamsNotificationEmail] `json:"notification_email"` +} + +func (r LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The email address to send health status notifications to. This field is now +// deprecated in favor of Cloudflare Notifications for Load Balancing, so only +// resetting this field with an empty string `""` is accepted. +type LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParamsNotificationEmail string + +const ( + LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParamsNotificationEmailEmpty LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParamsNotificationEmail = "\"\"" +) diff --git a/loadbalancerpool_test.go b/loadbalancerpool_test.go new file mode 100644 index 00000000000..383e0bf50f0 --- /dev/null +++ b/loadbalancerpool_test.go @@ -0,0 +1,312 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerPoolGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerPoolUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.Update( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + cloudflare.LoadBalancerPoolUpdateParams{ + Name: cloudflare.F("primary-dc-1"), + Origins: cloudflare.F([]cloudflare.LoadBalancerPoolUpdateParamsOrigin{{ + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }, { + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }, { + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }}), + CheckRegions: cloudflare.F([]cloudflare.LoadBalancerPoolUpdateParamsCheckRegion{cloudflare.LoadBalancerPoolUpdateParamsCheckRegionWeu, cloudflare.LoadBalancerPoolUpdateParamsCheckRegionEnam}), + Description: cloudflare.F("Primary data center - Provider XYZ"), + Enabled: cloudflare.F(false), + Latitude: cloudflare.F(0.000000), + LoadShedding: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsLoadShedding{ + DefaultPercent: cloudflare.F(0.000000), + DefaultPolicy: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicyRandom), + SessionPercent: cloudflare.F(0.000000), + SessionPolicy: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicyHash), + }), + Longitude: cloudflare.F(0.000000), + MinimumOrigins: cloudflare.F(int64(0)), + Monitor: cloudflare.F[any](map[string]interface{}{}), + NotificationEmail: cloudflare.F("someone@example.com,sometwo@example.com"), + NotificationFilter: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsNotificationFilter{ + Origin: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsNotificationFilterOrigin{ + Disable: cloudflare.F(true), + Healthy: cloudflare.F(true), + }), + Pool: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsNotificationFilterPool{ + Disable: cloudflare.F(true), + Healthy: cloudflare.F(false), + }), + }), + OriginSteering: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsOriginSteering{ + Policy: cloudflare.F(cloudflare.LoadBalancerPoolUpdateParamsOriginSteeringPolicyRandom), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerPoolDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.Delete( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerPoolAccountLoadBalancerPoolsNewPoolWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.AccountLoadBalancerPoolsNewPool( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParams{ + Name: cloudflare.F("primary-dc-1"), + Origins: cloudflare.F([]cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOrigin{{ + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }, { + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }, { + Address: cloudflare.F("0.0.0.0"), + Enabled: cloudflare.F(true), + Header: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginsHeader{ + Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}), + }), + Name: cloudflare.F("app-server-1"), + VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"), + Weight: cloudflare.F(0.600000), + }}), + Description: cloudflare.F("Primary data center - Provider XYZ"), + Enabled: cloudflare.F(false), + Latitude: cloudflare.F(0.000000), + LoadShedding: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadShedding{ + DefaultPercent: cloudflare.F(0.000000), + DefaultPolicy: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingDefaultPolicyRandom), + SessionPercent: cloudflare.F(0.000000), + SessionPolicy: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsLoadSheddingSessionPolicyHash), + }), + Longitude: cloudflare.F(0.000000), + MinimumOrigins: cloudflare.F(int64(0)), + Monitor: cloudflare.F[any](map[string]interface{}{}), + NotificationEmail: cloudflare.F("someone@example.com,sometwo@example.com"), + NotificationFilter: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilter{ + Origin: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterOrigin{ + Disable: cloudflare.F(true), + Healthy: cloudflare.F(true), + }), + Pool: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsNotificationFilterPool{ + Disable: cloudflare.F(true), + Healthy: cloudflare.F(false), + }), + }), + OriginSteering: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteering{ + Policy: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsNewPoolParamsOriginSteeringPolicyRandom), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerPoolAccountLoadBalancerPoolsListPoolsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.AccountLoadBalancerPoolsListPools( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsListPoolsParams{ + Monitor: cloudflare.F[any](map[string]interface{}{}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestLoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.AccountLoadBalancerPoolsPatchPools( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParams{ + NotificationEmail: cloudflare.F(cloudflare.LoadBalancerPoolAccountLoadBalancerPoolsPatchPoolsParamsNotificationEmailEmpty), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerpoolhealth.go b/loadbalancerpoolhealth.go new file mode 100644 index 00000000000..4dfcae7ca2e --- /dev/null +++ b/loadbalancerpoolhealth.go @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerPoolHealthService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerPoolHealthService] +// method instead. +type LoadBalancerPoolHealthService struct { + Options []option.RequestOption +} + +// NewLoadBalancerPoolHealthService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerPoolHealthService(opts ...option.RequestOption) (r *LoadBalancerPoolHealthService) { + r = &LoadBalancerPoolHealthService{} + r.Options = opts + return +} + +// Fetch the latest pool health status for a single pool. +func (r *LoadBalancerPoolHealthService) AccountLoadBalancerPoolsPoolHealthDetails(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s/health", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse struct { + Errors []LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseError `json:"errors"` + Messages []LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessage `json:"messages"` + // A list of regions from which to run health checks. Null means every Cloudflare + // data center. + Result interface{} `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseSuccess `json:"success"` + JSON loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseJSON `json:"-"` +} + +// loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse] +type loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseError] +type loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessage] +type loadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseSuccess bool + +const ( + LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseSuccessTrue LoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetailsResponseSuccess = true +) diff --git a/loadbalancerpoolhealth_test.go b/loadbalancerpoolhealth_test.go new file mode 100644 index 00000000000..098df54b08e --- /dev/null +++ b/loadbalancerpoolhealth_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerPoolHealthAccountLoadBalancerPoolsPoolHealthDetails(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.Health.AccountLoadBalancerPoolsPoolHealthDetails( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerpoolpreview.go b/loadbalancerpoolpreview.go new file mode 100644 index 00000000000..d6e51b6d9eb --- /dev/null +++ b/loadbalancerpoolpreview.go @@ -0,0 +1,203 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerPoolPreviewService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewLoadBalancerPoolPreviewService] method instead. +type LoadBalancerPoolPreviewService struct { + Options []option.RequestOption +} + +// NewLoadBalancerPoolPreviewService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerPoolPreviewService(opts ...option.RequestOption) (r *LoadBalancerPoolPreviewService) { + r = &LoadBalancerPoolPreviewService{} + r.Options = opts + return +} + +// Preview pool health using provided monitor details. The returned preview_id can +// be used in the preview endpoint to retrieve the results. +func (r *LoadBalancerPoolPreviewService) AccountLoadBalancerPoolsPreviewPool(ctx context.Context, accountIdentifier string, identifier string, body LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParams, opts ...option.RequestOption) (res *LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s/preview", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse struct { + Errors []LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseError `json:"errors"` + Messages []LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessage `json:"messages"` + Result LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResult `json:"result"` + // Whether the API call was successful + Success LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseSuccess `json:"success"` + JSON loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseJSON `json:"-"` +} + +// loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseJSON contains +// the JSON metadata for the struct +// [LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse] +type loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseError] +type loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessage] +type loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResult struct { + // Monitored pool IDs mapped to their respective names. + Pools interface{} `json:"pools"` + PreviewID string `json:"preview_id"` + JSON loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResultJSON `json:"-"` +} + +// loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResult] +type loadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResultJSON struct { + Pools apijson.Field + PreviewID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseSuccess bool + +const ( + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseSuccessTrue LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolResponseSuccess = true +) + +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParams struct { + // Do not validate the certificate when monitor use HTTPS. This parameter is + // currently only valid for HTTP and HTTPS monitors. + AllowInsecure param.Field[bool] `json:"allow_insecure"` + // To be marked unhealthy the monitored origin must fail this healthcheck N + // consecutive times. + ConsecutiveDown param.Field[int64] `json:"consecutive_down"` + // To be marked healthy the monitored origin must pass this healthcheck N + // consecutive times. + ConsecutiveUp param.Field[int64] `json:"consecutive_up"` + // Object description. + Description param.Field[string] `json:"description"` + // A case-insensitive sub-string to look for in the response body. If this string + // is not found, the origin will be marked as unhealthy. This parameter is only + // valid for HTTP and HTTPS monitors. + ExpectedBody param.Field[string] `json:"expected_body"` + // The expected HTTP response code or code range of the health check. This + // parameter is only valid for HTTP and HTTPS monitors. + ExpectedCodes param.Field[string] `json:"expected_codes"` + // Follow redirects if returned by the origin. This parameter is only valid for + // HTTP and HTTPS monitors. + FollowRedirects param.Field[bool] `json:"follow_redirects"` + // The HTTP request headers to send in the health check. It is recommended you set + // a Host header by default. The User-Agent header cannot be overridden. This + // parameter is only valid for HTTP and HTTPS monitors. + Header param.Field[interface{}] `json:"header"` + // The interval between each health check. Shorter intervals may improve failover + // time, but will increase load on the origins as we check from multiple locations. + Interval param.Field[int64] `json:"interval"` + // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS + // based checks and 'connection_established' for TCP based health checks. + Method param.Field[string] `json:"method"` + // The endpoint path you want to conduct a health check against. This parameter is + // only valid for HTTP and HTTPS monitors. + Path param.Field[string] `json:"path"` + // The port number to connect to for the health check. Required for TCP, UDP, and + // SMTP checks. HTTP and HTTPS checks should only define the port when using a + // non-standard port (HTTP: default 80, HTTPS: default 443). + Port param.Field[int64] `json:"port"` + // Assign this monitor to emulate the specified zone while probing. This parameter + // is only valid for HTTP and HTTPS monitors. + ProbeZone param.Field[string] `json:"probe_zone"` + // The number of retries to attempt in case of a timeout before marking the origin + // as unhealthy. Retries are attempted immediately. + Retries param.Field[int64] `json:"retries"` + // The timeout (in seconds) before marking the health check as failed. + Timeout param.Field[int64] `json:"timeout"` + // The protocol to use for the health check. Currently supported protocols are + // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + Type param.Field[LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType] `json:"type"` +} + +func (r LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The protocol to use for the health check. Currently supported protocols are +// 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. +type LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType string + +const ( + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeHTTP LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "http" + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeHTTPs LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "https" + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeTcp LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "tcp" + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeUdpIcmp LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "udp_icmp" + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeIcmpPing LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "icmp_ping" + LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeSmtp LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsType = "smtp" +) diff --git a/loadbalancerpoolpreview_test.go b/loadbalancerpoolpreview_test.go new file mode 100644 index 00000000000..b1698c4a406 --- /dev/null +++ b/loadbalancerpoolpreview_test.go @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.Previews.AccountLoadBalancerPoolsPreviewPool( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + cloudflare.LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParams{ + AllowInsecure: cloudflare.F(true), + ConsecutiveDown: cloudflare.F(int64(0)), + ConsecutiveUp: cloudflare.F(int64(0)), + Description: cloudflare.F("Login page monitor"), + ExpectedBody: cloudflare.F("alive"), + ExpectedCodes: cloudflare.F("2xx"), + FollowRedirects: cloudflare.F(true), + Header: cloudflare.F[any](map[string]interface{}{ + "Host": map[string]interface{}{ + "0": "example.com", + }, + "X-App-ID": map[string]interface{}{ + "0": "abc123", + }, + }), + Interval: cloudflare.F(int64(0)), + Method: cloudflare.F("GET"), + Path: cloudflare.F("/health"), + Port: cloudflare.F(int64(0)), + ProbeZone: cloudflare.F("example.com"), + Retries: cloudflare.F(int64(0)), + Timeout: cloudflare.F(int64(0)), + Type: cloudflare.F(cloudflare.LoadBalancerPoolPreviewAccountLoadBalancerPoolsPreviewPoolParamsTypeHTTPs), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerpoolreference.go b/loadbalancerpoolreference.go new file mode 100644 index 00000000000..855fe78c721 --- /dev/null +++ b/loadbalancerpoolreference.go @@ -0,0 +1,174 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerPoolReferenceService contains methods and other services that help +// with interacting with the cloudflare API. Note, unlike clients, this service +// does not read variables from the environment automatically. You should not +// instantiate this service directly, and instead use the +// [NewLoadBalancerPoolReferenceService] method instead. +type LoadBalancerPoolReferenceService struct { + Options []option.RequestOption +} + +// NewLoadBalancerPoolReferenceService generates a new service that applies the +// given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewLoadBalancerPoolReferenceService(opts ...option.RequestOption) (r *LoadBalancerPoolReferenceService) { + r = &LoadBalancerPoolReferenceService{} + r.Options = opts + return +} + +// Get the list of resources that reference the provided pool. +func (r *LoadBalancerPoolReferenceService) AccountLoadBalancerPoolsListPoolReferences(ctx context.Context, accountIdentifier string, identifier string, opts ...option.RequestOption) (res *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s/references", accountIdentifier, identifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse struct { + Errors []LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseError `json:"errors"` + Messages []LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessage `json:"messages"` + // List of resources that reference a given pool. + Result []LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResult `json:"result"` + ResultInfo LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseSuccess `json:"success"` + JSON loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseJSON `json:"-"` +} + +// loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse] +type loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseErrorJSON `json:"-"` +} + +// loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseErrorJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseError] +type loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessageJSON `json:"-"` +} + +// loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessageJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessage] +type loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResult struct { + ReferenceType LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceType `json:"reference_type"` + ResourceID string `json:"resource_id"` + ResourceName string `json:"resource_name"` + ResourceType string `json:"resource_type"` + JSON loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultJSON `json:"-"` +} + +// loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResult] +type loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultJSON struct { + ReferenceType apijson.Field + ResourceID apijson.Field + ResourceName apijson.Field + ResourceType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceType string + +const ( + LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceTypeStar LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceType = "*" + LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceTypeReferral LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceType = "referral" + LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceTypeReferrer LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultReferenceType = "referrer" +) + +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfoJSON `json:"-"` +} + +// loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfoJSON +// contains the JSON metadata for the struct +// [LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfo] +type loadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseSuccess bool + +const ( + LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseSuccessTrue LoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferencesResponseSuccess = true +) diff --git a/loadbalancerpoolreference_test.go b/loadbalancerpoolreference_test.go new file mode 100644 index 00000000000..57dbef8df60 --- /dev/null +++ b/loadbalancerpoolreference_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerPoolReferenceAccountLoadBalancerPoolsListPoolReferences(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Pools.References.AccountLoadBalancerPoolsListPoolReferences( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "17b5962d775c646f3f9725cbc7a53df4", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerpreview.go b/loadbalancerpreview.go new file mode 100644 index 00000000000..05c7ab24913 --- /dev/null +++ b/loadbalancerpreview.go @@ -0,0 +1,109 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerPreviewService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerPreviewService] +// method instead. +type LoadBalancerPreviewService struct { + Options []option.RequestOption +} + +// NewLoadBalancerPreviewService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerPreviewService(opts ...option.RequestOption) (r *LoadBalancerPreviewService) { + r = &LoadBalancerPreviewService{} + r.Options = opts + return +} + +// Get the result of a previous preview operation using the provided preview_id. +func (r *LoadBalancerPreviewService) Get(ctx context.Context, accountIdentifier string, previewID interface{}, opts ...option.RequestOption) (res *LoadBalancerPreviewGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/preview/%v", accountIdentifier, previewID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type LoadBalancerPreviewGetResponse struct { + Errors []LoadBalancerPreviewGetResponseError `json:"errors"` + Messages []LoadBalancerPreviewGetResponseMessage `json:"messages"` + // Resulting health data from a preview operation. + Result interface{} `json:"result"` + // Whether the API call was successful + Success LoadBalancerPreviewGetResponseSuccess `json:"success"` + JSON loadBalancerPreviewGetResponseJSON `json:"-"` +} + +// loadBalancerPreviewGetResponseJSON contains the JSON metadata for the struct +// [LoadBalancerPreviewGetResponse] +type loadBalancerPreviewGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPreviewGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPreviewGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPreviewGetResponseErrorJSON `json:"-"` +} + +// loadBalancerPreviewGetResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerPreviewGetResponseError] +type loadBalancerPreviewGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPreviewGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerPreviewGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerPreviewGetResponseMessageJSON `json:"-"` +} + +// loadBalancerPreviewGetResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerPreviewGetResponseMessage] +type loadBalancerPreviewGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerPreviewGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerPreviewGetResponseSuccess bool + +const ( + LoadBalancerPreviewGetResponseSuccessTrue LoadBalancerPreviewGetResponseSuccess = true +) diff --git a/loadbalancerpreview_test.go b/loadbalancerpreview_test.go new file mode 100644 index 00000000000..ceb0f9c723e --- /dev/null +++ b/loadbalancerpreview_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerPreviewGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Previews.Get( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + "p1aba936b94213e5b8dca0c0dbf1f9cc", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/loadbalancerregion.go b/loadbalancerregion.go new file mode 100644 index 00000000000..5eb445b31ce --- /dev/null +++ b/loadbalancerregion.go @@ -0,0 +1,233 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerRegionService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerRegionService] method +// instead. +type LoadBalancerRegionService struct { + Options []option.RequestOption +} + +// NewLoadBalancerRegionService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerRegionService(opts ...option.RequestOption) (r *LoadBalancerRegionService) { + r = &LoadBalancerRegionService{} + r.Options = opts + return +} + +// Get a single region mapping. +func (r *LoadBalancerRegionService) Get(ctx context.Context, accountIdentifier string, regionCode LoadBalancerRegionGetParamsRegionCode, opts ...option.RequestOption) (res *LoadBalancerRegionGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/regions/%v", accountIdentifier, regionCode) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// List all region mappings. +func (r *LoadBalancerRegionService) LoadBalancerRegionsListRegions(ctx context.Context, accountIdentifier string, query LoadBalancerRegionLoadBalancerRegionsListRegionsParams, opts ...option.RequestOption) (res *LoadBalancerRegionLoadBalancerRegionsListRegionsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/regions", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type LoadBalancerRegionGetResponse struct { + Errors []LoadBalancerRegionGetResponseError `json:"errors"` + Messages []LoadBalancerRegionGetResponseMessage `json:"messages"` + // A list of countries and subdivisions mapped to a region. + Result interface{} `json:"result"` + // Whether the API call was successful + Success LoadBalancerRegionGetResponseSuccess `json:"success"` + JSON loadBalancerRegionGetResponseJSON `json:"-"` +} + +// loadBalancerRegionGetResponseJSON contains the JSON metadata for the struct +// [LoadBalancerRegionGetResponse] +type loadBalancerRegionGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerRegionGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerRegionGetResponseErrorJSON `json:"-"` +} + +// loadBalancerRegionGetResponseErrorJSON contains the JSON metadata for the struct +// [LoadBalancerRegionGetResponseError] +type loadBalancerRegionGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerRegionGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerRegionGetResponseMessageJSON `json:"-"` +} + +// loadBalancerRegionGetResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerRegionGetResponseMessage] +type loadBalancerRegionGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerRegionGetResponseSuccess bool + +const ( + LoadBalancerRegionGetResponseSuccessTrue LoadBalancerRegionGetResponseSuccess = true +) + +type LoadBalancerRegionLoadBalancerRegionsListRegionsResponse struct { + Errors []LoadBalancerRegionLoadBalancerRegionsListRegionsResponseError `json:"errors"` + Messages []LoadBalancerRegionLoadBalancerRegionsListRegionsResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success LoadBalancerRegionLoadBalancerRegionsListRegionsResponseSuccess `json:"success"` + JSON loadBalancerRegionLoadBalancerRegionsListRegionsResponseJSON `json:"-"` +} + +// loadBalancerRegionLoadBalancerRegionsListRegionsResponseJSON contains the JSON +// metadata for the struct +// [LoadBalancerRegionLoadBalancerRegionsListRegionsResponse] +type loadBalancerRegionLoadBalancerRegionsListRegionsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionLoadBalancerRegionsListRegionsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerRegionLoadBalancerRegionsListRegionsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerRegionLoadBalancerRegionsListRegionsResponseErrorJSON `json:"-"` +} + +// loadBalancerRegionLoadBalancerRegionsListRegionsResponseErrorJSON contains the +// JSON metadata for the struct +// [LoadBalancerRegionLoadBalancerRegionsListRegionsResponseError] +type loadBalancerRegionLoadBalancerRegionsListRegionsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionLoadBalancerRegionsListRegionsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerRegionLoadBalancerRegionsListRegionsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerRegionLoadBalancerRegionsListRegionsResponseMessageJSON `json:"-"` +} + +// loadBalancerRegionLoadBalancerRegionsListRegionsResponseMessageJSON contains the +// JSON metadata for the struct +// [LoadBalancerRegionLoadBalancerRegionsListRegionsResponseMessage] +type loadBalancerRegionLoadBalancerRegionsListRegionsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerRegionLoadBalancerRegionsListRegionsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerRegionLoadBalancerRegionsListRegionsResponseSuccess bool + +const ( + LoadBalancerRegionLoadBalancerRegionsListRegionsResponseSuccessTrue LoadBalancerRegionLoadBalancerRegionsListRegionsResponseSuccess = true +) + +// A list of Cloudflare regions. WNAM: Western North America, ENAM: Eastern North +// America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, +// SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, +// SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East +// Asia). +type LoadBalancerRegionGetParamsRegionCode string + +const ( + LoadBalancerRegionGetParamsRegionCodeWnam LoadBalancerRegionGetParamsRegionCode = "WNAM" + LoadBalancerRegionGetParamsRegionCodeEnam LoadBalancerRegionGetParamsRegionCode = "ENAM" + LoadBalancerRegionGetParamsRegionCodeWeu LoadBalancerRegionGetParamsRegionCode = "WEU" + LoadBalancerRegionGetParamsRegionCodeEeu LoadBalancerRegionGetParamsRegionCode = "EEU" + LoadBalancerRegionGetParamsRegionCodeNsam LoadBalancerRegionGetParamsRegionCode = "NSAM" + LoadBalancerRegionGetParamsRegionCodeSsam LoadBalancerRegionGetParamsRegionCode = "SSAM" + LoadBalancerRegionGetParamsRegionCodeOc LoadBalancerRegionGetParamsRegionCode = "OC" + LoadBalancerRegionGetParamsRegionCodeMe LoadBalancerRegionGetParamsRegionCode = "ME" + LoadBalancerRegionGetParamsRegionCodeNaf LoadBalancerRegionGetParamsRegionCode = "NAF" + LoadBalancerRegionGetParamsRegionCodeSaf LoadBalancerRegionGetParamsRegionCode = "SAF" + LoadBalancerRegionGetParamsRegionCodeSas LoadBalancerRegionGetParamsRegionCode = "SAS" + LoadBalancerRegionGetParamsRegionCodeSeas LoadBalancerRegionGetParamsRegionCode = "SEAS" + LoadBalancerRegionGetParamsRegionCodeNeas LoadBalancerRegionGetParamsRegionCode = "NEAS" +) + +type LoadBalancerRegionLoadBalancerRegionsListRegionsParams struct { + // Two-letter alpha-2 country code followed in ISO 3166-1. + CountryCodeA2 param.Field[string] `query:"country_code_a2"` + // Two-letter subdivision code followed in ISO 3166-2. + SubdivisionCode param.Field[string] `query:"subdivision_code"` + // Two-letter subdivision code followed in ISO 3166-2. + SubdivisionCodeA2 param.Field[string] `query:"subdivision_code_a2"` +} + +// URLQuery serializes [LoadBalancerRegionLoadBalancerRegionsListRegionsParams]'s +// query parameters as `url.Values`. +func (r LoadBalancerRegionLoadBalancerRegionsListRegionsParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} diff --git a/zoneratelimit_test.go b/loadbalancerregion_test.go similarity index 64% rename from zoneratelimit_test.go rename to loadbalancerregion_test.go index 421bc2bbf9d..cc3f9217394 100644 --- a/zoneratelimit_test.go +++ b/loadbalancerregion_test.go @@ -13,7 +13,8 @@ import ( "github.com/cloudflare/cloudflare-sdk-go/option" ) -func TestZoneRateLimitGet(t *testing.T) { +func TestLoadBalancerRegionGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,13 +25,14 @@ func TestZoneRateLimitGet(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.RateLimits.Get( + _, err := client.LoadBalancers.Regions.Get( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", - "372e67954025e0ba6aaa6d586b9e0b59", + cloudflare.LoadBalancerRegionGetParamsRegionCodeWnam, ) if err != nil { var apierr *cloudflare.Error @@ -41,7 +43,8 @@ func TestZoneRateLimitGet(t *testing.T) { } } -func TestZoneRateLimitListWithOptionalParams(t *testing.T) { +func TestLoadBalancerRegionLoadBalancerRegionsListRegionsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -52,15 +55,17 @@ func TestZoneRateLimitListWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) - _, err := client.Zones.RateLimits.List( + _, err := client.LoadBalancers.Regions.LoadBalancerRegionsListRegions( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneRateLimitListParams{ - Page: cloudflare.F(1.000000), - PerPage: cloudflare.F(1.000000), + cloudflare.LoadBalancerRegionLoadBalancerRegionsListRegionsParams{ + CountryCodeA2: cloudflare.F("US"), + SubdivisionCode: cloudflare.F("CA"), + SubdivisionCodeA2: cloudflare.F("CA"), }, ) if err != nil { diff --git a/loadbalancersearch.go b/loadbalancersearch.go new file mode 100644 index 00000000000..16b5fe6e977 --- /dev/null +++ b/loadbalancersearch.go @@ -0,0 +1,246 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// LoadBalancerSearchService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewLoadBalancerSearchService] method +// instead. +type LoadBalancerSearchService struct { + Options []option.RequestOption +} + +// NewLoadBalancerSearchService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewLoadBalancerSearchService(opts ...option.RequestOption) (r *LoadBalancerSearchService) { + r = &LoadBalancerSearchService{} + r.Options = opts + return +} + +// Search for Load Balancing resources. +func (r *LoadBalancerSearchService) List(ctx context.Context, accountIdentifier string, query LoadBalancerSearchListParams, opts ...option.RequestOption) (res *LoadBalancerSearchListResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/load_balancers/search", accountIdentifier) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type LoadBalancerSearchListResponse struct { + Errors []LoadBalancerSearchListResponseError `json:"errors"` + Messages []LoadBalancerSearchListResponseMessage `json:"messages"` + Result LoadBalancerSearchListResponseResult `json:"result"` + ResultInfo LoadBalancerSearchListResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success LoadBalancerSearchListResponseSuccess `json:"success"` + JSON loadBalancerSearchListResponseJSON `json:"-"` +} + +// loadBalancerSearchListResponseJSON contains the JSON metadata for the struct +// [LoadBalancerSearchListResponse] +type loadBalancerSearchListResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerSearchListResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerSearchListResponseErrorJSON `json:"-"` +} + +// loadBalancerSearchListResponseErrorJSON contains the JSON metadata for the +// struct [LoadBalancerSearchListResponseError] +type loadBalancerSearchListResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerSearchListResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON loadBalancerSearchListResponseMessageJSON `json:"-"` +} + +// loadBalancerSearchListResponseMessageJSON contains the JSON metadata for the +// struct [LoadBalancerSearchListResponseMessage] +type loadBalancerSearchListResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type LoadBalancerSearchListResponseResult struct { + // A list of resources matching the search query. + Resources []LoadBalancerSearchListResponseResultResource `json:"resources"` + JSON loadBalancerSearchListResponseResultJSON `json:"-"` +} + +// loadBalancerSearchListResponseResultJSON contains the JSON metadata for the +// struct [LoadBalancerSearchListResponseResult] +type loadBalancerSearchListResponseResultJSON struct { + Resources apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A reference to a load balancer resource. +type LoadBalancerSearchListResponseResultResource struct { + // When listed as a reference, the type (direction) of the reference. + ReferenceType LoadBalancerSearchListResponseResultResourcesReferenceType `json:"reference_type"` + // A list of references to (referrer) or from (referral) this resource. + References []interface{} `json:"references"` + ResourceID interface{} `json:"resource_id"` + // The human-identifiable name of the resource. + ResourceName string `json:"resource_name"` + // The type of the resource. + ResourceType LoadBalancerSearchListResponseResultResourcesResourceType `json:"resource_type"` + JSON loadBalancerSearchListResponseResultResourceJSON `json:"-"` +} + +// loadBalancerSearchListResponseResultResourceJSON contains the JSON metadata for +// the struct [LoadBalancerSearchListResponseResultResource] +type loadBalancerSearchListResponseResultResourceJSON struct { + ReferenceType apijson.Field + References apijson.Field + ResourceID apijson.Field + ResourceName apijson.Field + ResourceType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponseResultResource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// When listed as a reference, the type (direction) of the reference. +type LoadBalancerSearchListResponseResultResourcesReferenceType string + +const ( + LoadBalancerSearchListResponseResultResourcesReferenceTypeReferral LoadBalancerSearchListResponseResultResourcesReferenceType = "referral" + LoadBalancerSearchListResponseResultResourcesReferenceTypeReferrer LoadBalancerSearchListResponseResultResourcesReferenceType = "referrer" +) + +// The type of the resource. +type LoadBalancerSearchListResponseResultResourcesResourceType string + +const ( + LoadBalancerSearchListResponseResultResourcesResourceTypeLoadBalancer LoadBalancerSearchListResponseResultResourcesResourceType = "load_balancer" + LoadBalancerSearchListResponseResultResourcesResourceTypeMonitor LoadBalancerSearchListResponseResultResourcesResourceType = "monitor" + LoadBalancerSearchListResponseResultResourcesResourceTypePool LoadBalancerSearchListResponseResultResourcesResourceType = "pool" +) + +type LoadBalancerSearchListResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON loadBalancerSearchListResponseResultInfoJSON `json:"-"` +} + +// loadBalancerSearchListResponseResultInfoJSON contains the JSON metadata for the +// struct [LoadBalancerSearchListResponseResultInfo] +type loadBalancerSearchListResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LoadBalancerSearchListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type LoadBalancerSearchListResponseSuccess bool + +const ( + LoadBalancerSearchListResponseSuccessTrue LoadBalancerSearchListResponseSuccess = true +) + +type LoadBalancerSearchListParams struct { + Page param.Field[interface{}] `query:"page"` + PerPage param.Field[interface{}] `query:"per_page"` + SearchParams param.Field[LoadBalancerSearchListParamsSearchParams] `query:"search_params"` +} + +// URLQuery serializes [LoadBalancerSearchListParams]'s query parameters as +// `url.Values`. +func (r LoadBalancerSearchListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type LoadBalancerSearchListParamsSearchParams struct { + // Search query term. + Query param.Field[string] `query:"query"` + // The type of references to include ("\*" for all). + References param.Field[LoadBalancerSearchListParamsSearchParamsReferences] `query:"references"` +} + +// URLQuery serializes [LoadBalancerSearchListParamsSearchParams]'s query +// parameters as `url.Values`. +func (r LoadBalancerSearchListParamsSearchParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// The type of references to include ("\*" for all). +type LoadBalancerSearchListParamsSearchParamsReferences string + +const ( + LoadBalancerSearchListParamsSearchParamsReferencesEmpty LoadBalancerSearchListParamsSearchParamsReferences = "" + LoadBalancerSearchListParamsSearchParamsReferencesStar LoadBalancerSearchListParamsSearchParamsReferences = "*" + LoadBalancerSearchListParamsSearchParamsReferencesReferral LoadBalancerSearchListParamsSearchParamsReferences = "referral" + LoadBalancerSearchListParamsSearchParamsReferencesReferrer LoadBalancerSearchListParamsSearchParamsReferences = "referrer" +) diff --git a/loadbalancersearch_test.go b/loadbalancersearch_test.go new file mode 100644 index 00000000000..373c93b0345 --- /dev/null +++ b/loadbalancersearch_test.go @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestLoadBalancerSearchListWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.LoadBalancers.Searches.List( + context.TODO(), + "023e105f4ecef8ad9ca31a8372d0c353", + cloudflare.LoadBalancerSearchListParams{ + Page: cloudflare.F[any](map[string]interface{}{}), + PerPage: cloudflare.F[any](map[string]interface{}{}), + SearchParams: cloudflare.F(cloudflare.LoadBalancerSearchListParamsSearchParams{ + Query: cloudflare.F("primary"), + References: cloudflare.F(cloudflare.LoadBalancerSearchListParamsSearchParamsReferencesStar), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/option/requestoption.go b/option/requestoption.go index 85194023ea4..81269aa3da4 100644 --- a/option/requestoption.go +++ b/option/requestoption.go @@ -196,11 +196,11 @@ func WithAPIKey(value string) RequestOption { } } -// WithEmail returns a RequestOption that sets the client setting "email". -func WithEmail(value string) RequestOption { +// WithAPIEmail returns a RequestOption that sets the client setting "api_email". +func WithAPIEmail(value string) RequestOption { return func(r *requestconfig.RequestConfig) error { - r.Email = value - return r.Apply(WithHeader("x-auth-email", value)) + r.APIEmail = value + return r.Apply(WithHeader("X-Auth-Email", r.APIEmail)) } } @@ -211,3 +211,11 @@ func WithAPIToken(value string) RequestOption { return r.Apply(WithHeader("authorization", fmt.Sprintf("Bearer %s", r.APIToken))) } } + +// WithUserServiceKey returns a RequestOption that sets the client setting "user_service_key". +func WithUserServiceKey(value string) RequestOption { + return func(r *requestconfig.RequestConfig) error { + r.UserServiceKey = value + return r.Apply(WithHeader("X-Auth-User-Service-Key", r.UserServiceKey)) + } +} diff --git a/tunnel.go b/tunnel.go new file mode 100644 index 00000000000..3777bf86bd0 --- /dev/null +++ b/tunnel.go @@ -0,0 +1,842 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + "net/url" + "reflect" + "time" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// TunnelService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewTunnelService] method instead. +type TunnelService struct { + Options []option.RequestOption + Connections *TunnelConnectionService +} + +// NewTunnelService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewTunnelService(opts ...option.RequestOption) (r *TunnelService) { + r = &TunnelService{} + r.Options = opts + r.Connections = NewTunnelConnectionService(opts...) + return +} + +// Fetches a single Argo Tunnel. +func (r *TunnelService) Get(ctx context.Context, accountID string, tunnelID string, opts ...option.RequestOption) (res *TunnelGetResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/tunnels/%s", accountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +// Deletes an Argo Tunnel from an account. +func (r *TunnelService) Delete(ctx context.Context, accountID string, tunnelID string, body TunnelDeleteParams, opts ...option.RequestOption) (res *TunnelDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/tunnels/%s", accountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...) + return +} + +// Creates a new Argo Tunnel in an account. +func (r *TunnelService) ArgoTunnelNewAnArgoTunnel(ctx context.Context, accountID string, body TunnelArgoTunnelNewAnArgoTunnelParams, opts ...option.RequestOption) (res *TunnelArgoTunnelNewAnArgoTunnelResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/tunnels", accountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...) + return +} + +// Lists and filters all types of Tunnels in an account. +func (r *TunnelService) ArgoTunnelListArgoTunnels(ctx context.Context, accountID string, query TunnelArgoTunnelListArgoTunnelsParams, opts ...option.RequestOption) (res *TunnelArgoTunnelListArgoTunnelsResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/tunnels", accountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) + return +} + +type TunnelGetResponse struct { + Errors []TunnelGetResponseError `json:"errors"` + Messages []TunnelGetResponseMessage `json:"messages"` + Result TunnelGetResponseResult `json:"result"` + // Whether the API call was successful + Success TunnelGetResponseSuccess `json:"success"` + JSON tunnelGetResponseJSON `json:"-"` +} + +// tunnelGetResponseJSON contains the JSON metadata for the struct +// [TunnelGetResponse] +type tunnelGetResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelGetResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelGetResponseErrorJSON `json:"-"` +} + +// tunnelGetResponseErrorJSON contains the JSON metadata for the struct +// [TunnelGetResponseError] +type tunnelGetResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelGetResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelGetResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelGetResponseMessageJSON `json:"-"` +} + +// tunnelGetResponseMessageJSON contains the JSON metadata for the struct +// [TunnelGetResponseMessage] +type tunnelGetResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelGetResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelGetResponseResult struct { + // UUID of the tunnel. + ID string `json:"id,required"` + // The tunnel connections between your origin and Cloudflare's edge. + Connections []TunnelGetResponseResultConnection `json:"connections,required"` + // Timestamp of when the tunnel was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // A user-friendly name for the tunnel. + Name string `json:"name,required"` + // Timestamp of when the tunnel was deleted. If `null`, the tunnel has not been + // deleted. + DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"` + JSON tunnelGetResponseResultJSON `json:"-"` +} + +// tunnelGetResponseResultJSON contains the JSON metadata for the struct +// [TunnelGetResponseResult] +type tunnelGetResponseResultJSON struct { + ID apijson.Field + Connections apijson.Field + CreatedAt apijson.Field + Name apijson.Field + DeletedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelGetResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelGetResponseResultConnection struct { + // The Cloudflare data center used for this connection. + ColoName string `json:"colo_name"` + // Cloudflare continues to track connections for several minutes after they + // disconnect. This is an optimization to improve latency and reliability of + // reconnecting. If `true`, the connection has disconnected but is still being + // tracked. If `false`, the connection is actively serving traffic. + IsPendingReconnect bool `json:"is_pending_reconnect"` + // UUID of the Cloudflare Tunnel connection. + Uuid string `json:"uuid"` + JSON tunnelGetResponseResultConnectionJSON `json:"-"` +} + +// tunnelGetResponseResultConnectionJSON contains the JSON metadata for the struct +// [TunnelGetResponseResultConnection] +type tunnelGetResponseResultConnectionJSON struct { + ColoName apijson.Field + IsPendingReconnect apijson.Field + Uuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelGetResponseResultConnection) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type TunnelGetResponseSuccess bool + +const ( + TunnelGetResponseSuccessTrue TunnelGetResponseSuccess = true +) + +type TunnelDeleteResponse struct { + Errors []TunnelDeleteResponseError `json:"errors"` + Messages []TunnelDeleteResponseMessage `json:"messages"` + Result TunnelDeleteResponseResult `json:"result"` + // Whether the API call was successful + Success TunnelDeleteResponseSuccess `json:"success"` + JSON tunnelDeleteResponseJSON `json:"-"` +} + +// tunnelDeleteResponseJSON contains the JSON metadata for the struct +// [TunnelDeleteResponse] +type tunnelDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelDeleteResponseErrorJSON `json:"-"` +} + +// tunnelDeleteResponseErrorJSON contains the JSON metadata for the struct +// [TunnelDeleteResponseError] +type tunnelDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelDeleteResponseMessageJSON `json:"-"` +} + +// tunnelDeleteResponseMessageJSON contains the JSON metadata for the struct +// [TunnelDeleteResponseMessage] +type tunnelDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelDeleteResponseResult struct { + // UUID of the tunnel. + ID string `json:"id,required"` + // The tunnel connections between your origin and Cloudflare's edge. + Connections []TunnelDeleteResponseResultConnection `json:"connections,required"` + // Timestamp of when the tunnel was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // A user-friendly name for the tunnel. + Name string `json:"name,required"` + // Timestamp of when the tunnel was deleted. If `null`, the tunnel has not been + // deleted. + DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"` + JSON tunnelDeleteResponseResultJSON `json:"-"` +} + +// tunnelDeleteResponseResultJSON contains the JSON metadata for the struct +// [TunnelDeleteResponseResult] +type tunnelDeleteResponseResultJSON struct { + ID apijson.Field + Connections apijson.Field + CreatedAt apijson.Field + Name apijson.Field + DeletedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelDeleteResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelDeleteResponseResultConnection struct { + // The Cloudflare data center used for this connection. + ColoName string `json:"colo_name"` + // Cloudflare continues to track connections for several minutes after they + // disconnect. This is an optimization to improve latency and reliability of + // reconnecting. If `true`, the connection has disconnected but is still being + // tracked. If `false`, the connection is actively serving traffic. + IsPendingReconnect bool `json:"is_pending_reconnect"` + // UUID of the Cloudflare Tunnel connection. + Uuid string `json:"uuid"` + JSON tunnelDeleteResponseResultConnectionJSON `json:"-"` +} + +// tunnelDeleteResponseResultConnectionJSON contains the JSON metadata for the +// struct [TunnelDeleteResponseResultConnection] +type tunnelDeleteResponseResultConnectionJSON struct { + ColoName apijson.Field + IsPendingReconnect apijson.Field + Uuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelDeleteResponseResultConnection) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type TunnelDeleteResponseSuccess bool + +const ( + TunnelDeleteResponseSuccessTrue TunnelDeleteResponseSuccess = true +) + +type TunnelArgoTunnelNewAnArgoTunnelResponse struct { + Errors []TunnelArgoTunnelNewAnArgoTunnelResponseError `json:"errors"` + Messages []TunnelArgoTunnelNewAnArgoTunnelResponseMessage `json:"messages"` + Result TunnelArgoTunnelNewAnArgoTunnelResponseResult `json:"result"` + // Whether the API call was successful + Success TunnelArgoTunnelNewAnArgoTunnelResponseSuccess `json:"success"` + JSON tunnelArgoTunnelNewAnArgoTunnelResponseJSON `json:"-"` +} + +// tunnelArgoTunnelNewAnArgoTunnelResponseJSON contains the JSON metadata for the +// struct [TunnelArgoTunnelNewAnArgoTunnelResponse] +type tunnelArgoTunnelNewAnArgoTunnelResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelNewAnArgoTunnelResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelNewAnArgoTunnelResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelArgoTunnelNewAnArgoTunnelResponseErrorJSON `json:"-"` +} + +// tunnelArgoTunnelNewAnArgoTunnelResponseErrorJSON contains the JSON metadata for +// the struct [TunnelArgoTunnelNewAnArgoTunnelResponseError] +type tunnelArgoTunnelNewAnArgoTunnelResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelNewAnArgoTunnelResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelNewAnArgoTunnelResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelArgoTunnelNewAnArgoTunnelResponseMessageJSON `json:"-"` +} + +// tunnelArgoTunnelNewAnArgoTunnelResponseMessageJSON contains the JSON metadata +// for the struct [TunnelArgoTunnelNewAnArgoTunnelResponseMessage] +type tunnelArgoTunnelNewAnArgoTunnelResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelNewAnArgoTunnelResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelNewAnArgoTunnelResponseResult struct { + // UUID of the tunnel. + ID string `json:"id,required"` + // The tunnel connections between your origin and Cloudflare's edge. + Connections []TunnelArgoTunnelNewAnArgoTunnelResponseResultConnection `json:"connections,required"` + // Timestamp of when the tunnel was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // A user-friendly name for the tunnel. + Name string `json:"name,required"` + // Timestamp of when the tunnel was deleted. If `null`, the tunnel has not been + // deleted. + DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"` + JSON tunnelArgoTunnelNewAnArgoTunnelResponseResultJSON `json:"-"` +} + +// tunnelArgoTunnelNewAnArgoTunnelResponseResultJSON contains the JSON metadata for +// the struct [TunnelArgoTunnelNewAnArgoTunnelResponseResult] +type tunnelArgoTunnelNewAnArgoTunnelResponseResultJSON struct { + ID apijson.Field + Connections apijson.Field + CreatedAt apijson.Field + Name apijson.Field + DeletedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelNewAnArgoTunnelResponseResult) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelNewAnArgoTunnelResponseResultConnection struct { + // The Cloudflare data center used for this connection. + ColoName string `json:"colo_name"` + // Cloudflare continues to track connections for several minutes after they + // disconnect. This is an optimization to improve latency and reliability of + // reconnecting. If `true`, the connection has disconnected but is still being + // tracked. If `false`, the connection is actively serving traffic. + IsPendingReconnect bool `json:"is_pending_reconnect"` + // UUID of the Cloudflare Tunnel connection. + Uuid string `json:"uuid"` + JSON tunnelArgoTunnelNewAnArgoTunnelResponseResultConnectionJSON `json:"-"` +} + +// tunnelArgoTunnelNewAnArgoTunnelResponseResultConnectionJSON contains the JSON +// metadata for the struct +// [TunnelArgoTunnelNewAnArgoTunnelResponseResultConnection] +type tunnelArgoTunnelNewAnArgoTunnelResponseResultConnectionJSON struct { + ColoName apijson.Field + IsPendingReconnect apijson.Field + Uuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelNewAnArgoTunnelResponseResultConnection) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type TunnelArgoTunnelNewAnArgoTunnelResponseSuccess bool + +const ( + TunnelArgoTunnelNewAnArgoTunnelResponseSuccessTrue TunnelArgoTunnelNewAnArgoTunnelResponseSuccess = true +) + +type TunnelArgoTunnelListArgoTunnelsResponse struct { + Errors []TunnelArgoTunnelListArgoTunnelsResponseError `json:"errors"` + Messages []TunnelArgoTunnelListArgoTunnelsResponseMessage `json:"messages"` + Result []TunnelArgoTunnelListArgoTunnelsResponseResult `json:"result"` + ResultInfo TunnelArgoTunnelListArgoTunnelsResponseResultInfo `json:"result_info"` + // Whether the API call was successful + Success TunnelArgoTunnelListArgoTunnelsResponseSuccess `json:"success"` + JSON tunnelArgoTunnelListArgoTunnelsResponseJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseJSON contains the JSON metadata for the +// struct [TunnelArgoTunnelListArgoTunnelsResponse] +type tunnelArgoTunnelListArgoTunnelsResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + ResultInfo apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelListArgoTunnelsResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelArgoTunnelListArgoTunnelsResponseErrorJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseErrorJSON contains the JSON metadata for +// the struct [TunnelArgoTunnelListArgoTunnelsResponseError] +type tunnelArgoTunnelListArgoTunnelsResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelArgoTunnelListArgoTunnelsResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelArgoTunnelListArgoTunnelsResponseMessageJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseMessageJSON contains the JSON metadata +// for the struct [TunnelArgoTunnelListArgoTunnelsResponseMessage] +type tunnelArgoTunnelListArgoTunnelsResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// A Cloudflare Tunnel that connects your origin to Cloudflare's edge. +// +// Union satisfied by +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnel] or +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnel]. +type TunnelArgoTunnelListArgoTunnelsResponseResult interface { + implementsTunnelArgoTunnelListArgoTunnelsResponseResult() +} + +func init() { + apijson.RegisterUnion(reflect.TypeOf((*TunnelArgoTunnelListArgoTunnelsResponseResult)(nil)).Elem(), "") +} + +// A Cloudflare Tunnel that connects your origin to Cloudflare's edge. +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnel struct { + // UUID of the tunnel. + ID string `json:"id"` + // Cloudflare account ID + AccountTag string `json:"account_tag"` + // The Cloudflare Tunnel connections between your origin and Cloudflare's edge. + Connections []TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnection `json:"connections"` + // Timestamp of when the tunnel established at least one connection to Cloudflare's + // edge. If `null`, the tunnel is inactive. + ConnsActiveAt time.Time `json:"conns_active_at,nullable" format:"date-time"` + // Timestamp of when the tunnel became inactive (no connections to Cloudflare's + // edge). If `null`, the tunnel is active. + ConnsInactiveAt time.Time `json:"conns_inactive_at,nullable" format:"date-time"` + // Timestamp of when the tunnel was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Timestamp of when the tunnel was deleted. If `null`, the tunnel has not been + // deleted. + DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"` + // Metadata associated with the tunnel. + Metadata interface{} `json:"metadata"` + // A user-friendly name for the tunnel. + Name string `json:"name"` + // If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. + // If `false`, the tunnel must be configured locally on the origin machine. + RemoteConfig bool `json:"remote_config"` + // The status of the tunnel. Valid values are `inactive` (tunnel has never been + // run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy + // state), `healthy` (tunnel is active and able to serve traffic), or `down` + // (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). + Status string `json:"status"` + // The type of tunnel. + TunType TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType `json:"tun_type"` + JSON tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelJSON contains the +// JSON metadata for the struct +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnel] +type tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelJSON struct { + ID apijson.Field + AccountTag apijson.Field + Connections apijson.Field + ConnsActiveAt apijson.Field + ConnsInactiveAt apijson.Field + CreatedAt apijson.Field + DeletedAt apijson.Field + Metadata apijson.Field + Name apijson.Field + RemoteConfig apijson.Field + Status apijson.Field + TunType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnel) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnel) implementsTunnelArgoTunnelListArgoTunnelsResponseResult() { +} + +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnection struct { + // UUID of the Cloudflare Tunnel connection. + ID string `json:"id"` + // UUID of the cloudflared instance. + ClientID interface{} `json:"client_id"` + // The cloudflared version used to establish this connection. + ClientVersion string `json:"client_version"` + // The Cloudflare data center used for this connection. + ColoName string `json:"colo_name"` + // Cloudflare continues to track connections for several minutes after they + // disconnect. This is an optimization to improve latency and reliability of + // reconnecting. If `true`, the connection has disconnected but is still being + // tracked. If `false`, the connection is actively serving traffic. + IsPendingReconnect bool `json:"is_pending_reconnect"` + // Timestamp of when the connection was established. + OpenedAt time.Time `json:"opened_at" format:"date-time"` + // The public IP address of the host running cloudflared. + OriginIP string `json:"origin_ip"` + // UUID of the Cloudflare Tunnel connection. + Uuid string `json:"uuid"` + JSON tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnectionJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnectionJSON +// contains the JSON metadata for the struct +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnection] +type tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnectionJSON struct { + ID apijson.Field + ClientID apijson.Field + ClientVersion apijson.Field + ColoName apijson.Field + IsPendingReconnect apijson.Field + OpenedAt apijson.Field + OriginIP apijson.Field + Uuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelConnection) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of tunnel. +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType string + +const ( + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunTypeCfdTunnel TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType = "cfd_tunnel" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunTypeWarpConnector TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType = "warp_connector" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunTypeIPSec TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType = "ip_sec" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunTypeGre TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType = "gre" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunTypeCni TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkCfdTunnelTunType = "cni" +) + +// A Warp Connector Tunnel that connects your origin to Cloudflare's edge. +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnel struct { + // UUID of the tunnel. + ID string `json:"id"` + // Cloudflare account ID + AccountTag string `json:"account_tag"` + // The Cloudflare Tunnel connections between your origin and Cloudflare's edge. + Connections []TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnection `json:"connections"` + // Timestamp of when the tunnel established at least one connection to Cloudflare's + // edge. If `null`, the tunnel is inactive. + ConnsActiveAt time.Time `json:"conns_active_at,nullable" format:"date-time"` + // Timestamp of when the tunnel became inactive (no connections to Cloudflare's + // edge). If `null`, the tunnel is active. + ConnsInactiveAt time.Time `json:"conns_inactive_at,nullable" format:"date-time"` + // Timestamp of when the tunnel was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // Timestamp of when the tunnel was deleted. If `null`, the tunnel has not been + // deleted. + DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"` + // Metadata associated with the tunnel. + Metadata interface{} `json:"metadata"` + // A user-friendly name for the tunnel. + Name string `json:"name"` + // The status of the tunnel. Valid values are `inactive` (tunnel has never been + // run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy + // state), `healthy` (tunnel is active and able to serve traffic), or `down` + // (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). + Status string `json:"status"` + // The type of tunnel. + TunType TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType `json:"tun_type"` + JSON tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelJSON +// contains the JSON metadata for the struct +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnel] +type tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelJSON struct { + ID apijson.Field + AccountTag apijson.Field + Connections apijson.Field + ConnsActiveAt apijson.Field + ConnsInactiveAt apijson.Field + CreatedAt apijson.Field + DeletedAt apijson.Field + Metadata apijson.Field + Name apijson.Field + Status apijson.Field + TunType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnel) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnel) implementsTunnelArgoTunnelListArgoTunnelsResponseResult() { +} + +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnection struct { + // UUID of the Cloudflare Tunnel connection. + ID string `json:"id"` + // UUID of the cloudflared instance. + ClientID interface{} `json:"client_id"` + // The cloudflared version used to establish this connection. + ClientVersion string `json:"client_version"` + // The Cloudflare data center used for this connection. + ColoName string `json:"colo_name"` + // Cloudflare continues to track connections for several minutes after they + // disconnect. This is an optimization to improve latency and reliability of + // reconnecting. If `true`, the connection has disconnected but is still being + // tracked. If `false`, the connection is actively serving traffic. + IsPendingReconnect bool `json:"is_pending_reconnect"` + // Timestamp of when the connection was established. + OpenedAt time.Time `json:"opened_at" format:"date-time"` + // The public IP address of the host running cloudflared. + OriginIP string `json:"origin_ip"` + // UUID of the Cloudflare Tunnel connection. + Uuid string `json:"uuid"` + JSON tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnectionJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnectionJSON +// contains the JSON metadata for the struct +// [TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnection] +type tunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnectionJSON struct { + ID apijson.Field + ClientID apijson.Field + ClientVersion apijson.Field + ColoName apijson.Field + IsPendingReconnect apijson.Field + OpenedAt apijson.Field + OriginIP apijson.Field + Uuid apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelConnection) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// The type of tunnel. +type TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType string + +const ( + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunTypeCfdTunnel TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType = "cfd_tunnel" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunTypeWarpConnector TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType = "warp_connector" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunTypeIPSec TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType = "ip_sec" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunTypeGre TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType = "gre" + TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunTypeCni TunnelArgoTunnelListArgoTunnelsResponseResultXlFXheKkWarpConnectorTunnelTunType = "cni" +) + +type TunnelArgoTunnelListArgoTunnelsResponseResultInfo struct { + // Total number of results for the requested service + Count float64 `json:"count"` + // Current page within paginated list of results + Page float64 `json:"page"` + // Number of results per page of results + PerPage float64 `json:"per_page"` + // Total results available without any search parameters + TotalCount float64 `json:"total_count"` + JSON tunnelArgoTunnelListArgoTunnelsResponseResultInfoJSON `json:"-"` +} + +// tunnelArgoTunnelListArgoTunnelsResponseResultInfoJSON contains the JSON metadata +// for the struct [TunnelArgoTunnelListArgoTunnelsResponseResultInfo] +type tunnelArgoTunnelListArgoTunnelsResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelArgoTunnelListArgoTunnelsResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type TunnelArgoTunnelListArgoTunnelsResponseSuccess bool + +const ( + TunnelArgoTunnelListArgoTunnelsResponseSuccessTrue TunnelArgoTunnelListArgoTunnelsResponseSuccess = true +) + +type TunnelDeleteParams struct { + Body param.Field[interface{}] `json:"body,required"` +} + +func (r TunnelDeleteParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type TunnelArgoTunnelNewAnArgoTunnelParams struct { + // A user-friendly name for the tunnel. + Name param.Field[string] `json:"name,required"` + // Sets the password required to run the tunnel. Must be at least 32 bytes and + // encoded as a base64 string. + TunnelSecret param.Field[interface{}] `json:"tunnel_secret,required"` +} + +func (r TunnelArgoTunnelNewAnArgoTunnelParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type TunnelArgoTunnelListArgoTunnelsParams struct { + ExcludePrefix param.Field[string] `query:"exclude_prefix"` + // If provided, include only tunnels that were created (and not deleted) before + // this time. + ExistedAt param.Field[time.Time] `query:"existed_at" format:"date-time"` + IncludePrefix param.Field[string] `query:"include_prefix"` + // If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If + // empty, all tunnels will be included. + IsDeleted param.Field[bool] `query:"is_deleted"` + // A user-friendly name for the tunnel. + Name param.Field[string] `query:"name"` + // Page number of paginated results. + Page param.Field[float64] `query:"page"` + // Number of results to display. + PerPage param.Field[float64] `query:"per_page"` + // The types of tunnels to filter separated by a comma. + TunTypes param.Field[string] `query:"tun_types"` + WasActiveAt param.Field[time.Time] `query:"was_active_at" format:"date-time"` + WasInactiveAt param.Field[time.Time] `query:"was_inactive_at" format:"date-time"` +} + +// URLQuery serializes [TunnelArgoTunnelListArgoTunnelsParams]'s query parameters +// as `url.Values`. +func (r TunnelArgoTunnelListArgoTunnelsParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatComma, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} diff --git a/tunnel_test.go b/tunnel_test.go new file mode 100644 index 00000000000..63664d3f7e0 --- /dev/null +++ b/tunnel_test.go @@ -0,0 +1,152 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + "time" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestTunnelGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Tunnels.Get( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestTunnelDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Tunnels.Delete( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + cloudflare.TunnelDeleteParams{ + Body: cloudflare.F[any](map[string]interface{}{}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestTunnelArgoTunnelNewAnArgoTunnel(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Tunnels.ArgoTunnelNewAnArgoTunnel( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + cloudflare.TunnelArgoTunnelNewAnArgoTunnelParams{ + Name: cloudflare.F("blog"), + TunnelSecret: cloudflare.F[any](map[string]interface{}{}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestTunnelArgoTunnelListArgoTunnelsWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Tunnels.ArgoTunnelListArgoTunnels( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + cloudflare.TunnelArgoTunnelListArgoTunnelsParams{ + ExcludePrefix: cloudflare.F("vpc1-"), + ExistedAt: cloudflare.F(time.Now()), + IncludePrefix: cloudflare.F("vpc1-"), + IsDeleted: cloudflare.F(true), + Name: cloudflare.F("blog"), + Page: cloudflare.F(1.000000), + PerPage: cloudflare.F(1.000000), + TunTypes: cloudflare.F("cfd_tunnel,warp_connector"), + WasActiveAt: cloudflare.F(time.Now()), + WasInactiveAt: cloudflare.F(time.Now()), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/tunnelconnection.go b/tunnelconnection.go new file mode 100644 index 00000000000..76d608081d9 --- /dev/null +++ b/tunnelconnection.go @@ -0,0 +1,118 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" + "github.com/cloudflare/cloudflare-sdk-go/internal/param" + "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +// TunnelConnectionService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewTunnelConnectionService] method +// instead. +type TunnelConnectionService struct { + Options []option.RequestOption +} + +// NewTunnelConnectionService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewTunnelConnectionService(opts ...option.RequestOption) (r *TunnelConnectionService) { + r = &TunnelConnectionService{} + r.Options = opts + return +} + +// Removes connections that are in a disconnected or pending reconnect state. We +// recommend running this command after shutting down a tunnel. +func (r *TunnelConnectionService) Delete(ctx context.Context, accountID string, tunnelID string, body TunnelConnectionDeleteParams, opts ...option.RequestOption) (res *TunnelConnectionDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("accounts/%s/tunnels/%s/connections", accountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...) + return +} + +type TunnelConnectionDeleteResponse struct { + Errors []TunnelConnectionDeleteResponseError `json:"errors"` + Messages []TunnelConnectionDeleteResponseMessage `json:"messages"` + Result interface{} `json:"result"` + // Whether the API call was successful + Success TunnelConnectionDeleteResponseSuccess `json:"success"` + JSON tunnelConnectionDeleteResponseJSON `json:"-"` +} + +// tunnelConnectionDeleteResponseJSON contains the JSON metadata for the struct +// [TunnelConnectionDeleteResponse] +type tunnelConnectionDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelConnectionDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelConnectionDeleteResponseError struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelConnectionDeleteResponseErrorJSON `json:"-"` +} + +// tunnelConnectionDeleteResponseErrorJSON contains the JSON metadata for the +// struct [TunnelConnectionDeleteResponseError] +type tunnelConnectionDeleteResponseErrorJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelConnectionDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +type TunnelConnectionDeleteResponseMessage struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + JSON tunnelConnectionDeleteResponseMessageJSON `json:"-"` +} + +// tunnelConnectionDeleteResponseMessageJSON contains the JSON metadata for the +// struct [TunnelConnectionDeleteResponseMessage] +type tunnelConnectionDeleteResponseMessageJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TunnelConnectionDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +// Whether the API call was successful +type TunnelConnectionDeleteResponseSuccess bool + +const ( + TunnelConnectionDeleteResponseSuccessTrue TunnelConnectionDeleteResponseSuccess = true +) + +type TunnelConnectionDeleteParams struct { + Body param.Field[interface{}] `json:"body,required"` +} + +func (r TunnelConnectionDeleteParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} diff --git a/tunnelconnection_test.go b/tunnelconnection_test.go new file mode 100644 index 00000000000..d442943ac94 --- /dev/null +++ b/tunnelconnection_test.go @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec by Stainless. + +package cloudflare_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-sdk-go" + "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" + "github.com/cloudflare/cloudflare-sdk-go/option" +) + +func TestTunnelConnectionDelete(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("dev@cloudflare.com"), + option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), + ) + _, err := client.Tunnels.Connections.Delete( + context.TODO(), + "699d98642c564d2e855e9661899b7252", + "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + cloudflare.TunnelConnectionDeleteParams{ + Body: cloudflare.F[any](map[string]interface{}{}), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/usage_test.go b/usage_test.go index c7d39708582..292cd775ef7 100644 --- a/usage_test.go +++ b/usage_test.go @@ -23,8 +23,9 @@ func TestUsage(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) zoneNewResponse, err := client.Zones.New(context.TODO(), cloudflare.ZoneNewParams{ Account: cloudflare.F(cloudflare.ZoneNewParamsAccount{ diff --git a/zone.go b/zone.go index 040983a3471..ff619ba51e1 100644 --- a/zone.go +++ b/zone.go @@ -21,11 +21,7 @@ import ( // from the environment automatically. You should not instantiate this service // directly, and instead use the [NewZoneService] method instead. type ZoneService struct { - Options []option.RequestOption - LoadBalancers *ZoneLoadBalancerService - Dnssecs *ZoneDnssecService - RateLimits *ZoneRateLimitService - Settings *ZoneSettingService + Options []option.RequestOption } // NewZoneService generates a new service that applies the given options to each @@ -34,10 +30,6 @@ type ZoneService struct { func NewZoneService(opts ...option.RequestOption) (r *ZoneService) { r = &ZoneService{} r.Options = opts - r.LoadBalancers = NewZoneLoadBalancerService(opts...) - r.Dnssecs = NewZoneDnssecService(opts...) - r.RateLimits = NewZoneRateLimitService(opts...) - r.Settings = NewZoneSettingService(opts...) return } diff --git a/zone_test.go b/zone_test.go index 9a6cb5681e0..8d1975d5b74 100644 --- a/zone_test.go +++ b/zone_test.go @@ -14,6 +14,7 @@ import ( ) func TestZoneNewWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -24,8 +25,9 @@ func TestZoneNewWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.Zones.New(context.TODO(), cloudflare.ZoneNewParams{ Account: cloudflare.F(cloudflare.ZoneNewParamsAccount{ @@ -44,6 +46,7 @@ func TestZoneNewWithOptionalParams(t *testing.T) { } func TestZoneGet(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,8 +57,9 @@ func TestZoneGet(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.Zones.Get(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { @@ -68,6 +72,7 @@ func TestZoneGet(t *testing.T) { } func TestZoneUpdateWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,8 +83,9 @@ func TestZoneUpdateWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.Zones.Update( context.TODO(), @@ -102,6 +108,7 @@ func TestZoneUpdateWithOptionalParams(t *testing.T) { } func TestZoneListWithOptionalParams(t *testing.T) { + t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,8 +119,9 @@ func TestZoneListWithOptionalParams(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.Zones.List(context.TODO(), cloudflare.ZoneListParams{ Account: cloudflare.F(cloudflare.ZoneListParamsAccount{ @@ -149,8 +157,9 @@ func TestZoneDelete(t *testing.T) { client := cloudflare.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), + option.WithAPIEmail("dev@cloudflare.com"), option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), + option.WithUserServiceKey("My User Service Key"), ) _, err := client.Zones.Delete(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { diff --git a/zonednssec.go b/zonednssec.go deleted file mode 100644 index 97544fd8d4a..00000000000 --- a/zonednssec.go +++ /dev/null @@ -1,24 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneDnssecService contains methods and other services that help with interacting -// with the cloudflare API. Note, unlike clients, this service does not read -// variables from the environment automatically. You should not instantiate this -// service directly, and instead use the [NewZoneDnssecService] method instead. -type ZoneDnssecService struct { - Options []option.RequestOption -} - -// NewZoneDnssecService generates a new service that applies the given options to -// each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneDnssecService(opts ...option.RequestOption) (r *ZoneDnssecService) { - r = &ZoneDnssecService{} - r.Options = opts - return -} diff --git a/zoneratelimit.go b/zoneratelimit.go deleted file mode 100644 index 3e3cb773a0d..00000000000 --- a/zoneratelimit.go +++ /dev/null @@ -1,499 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "net/url" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/apiquery" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneRateLimitService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneRateLimitService] method -// instead. -type ZoneRateLimitService struct { - Options []option.RequestOption -} - -// NewZoneRateLimitService generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneRateLimitService(opts ...option.RequestOption) (r *ZoneRateLimitService) { - r = &ZoneRateLimitService{} - r.Options = opts - return -} - -// Fetches the details of a rate limit. -func (r *ZoneRateLimitService) Get(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *ZoneRateLimitGetResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/rate_limits/%s", zoneIdentifier, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -// Fetches the rate limits for a zone. -func (r *ZoneRateLimitService) List(ctx context.Context, zoneIdentifier string, query ZoneRateLimitListParams, opts ...option.RequestOption) (res *ZoneRateLimitListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/rate_limits", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...) - return -} - -type ZoneRateLimitGetResponse struct { - Errors []ZoneRateLimitGetResponseError `json:"errors"` - Messages []ZoneRateLimitGetResponseMessage `json:"messages"` - Result interface{} `json:"result"` - // Whether the API call was successful - Success ZoneRateLimitGetResponseSuccess `json:"success"` - JSON zoneRateLimitGetResponseJSON `json:"-"` -} - -// zoneRateLimitGetResponseJSON contains the JSON metadata for the struct -// [ZoneRateLimitGetResponse] -type zoneRateLimitGetResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitGetResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneRateLimitGetResponseErrorJSON `json:"-"` -} - -// zoneRateLimitGetResponseErrorJSON contains the JSON metadata for the struct -// [ZoneRateLimitGetResponseError] -type zoneRateLimitGetResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitGetResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitGetResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneRateLimitGetResponseMessageJSON `json:"-"` -} - -// zoneRateLimitGetResponseMessageJSON contains the JSON metadata for the struct -// [ZoneRateLimitGetResponseMessage] -type zoneRateLimitGetResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitGetResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether the API call was successful -type ZoneRateLimitGetResponseSuccess bool - -const ( - ZoneRateLimitGetResponseSuccessTrue ZoneRateLimitGetResponseSuccess = true -) - -type ZoneRateLimitListResponse struct { - Errors []ZoneRateLimitListResponseError `json:"errors"` - Messages []ZoneRateLimitListResponseMessage `json:"messages"` - Result []ZoneRateLimitListResponseResult `json:"result"` - ResultInfo ZoneRateLimitListResponseResultInfo `json:"result_info"` - // Whether the API call was successful - Success ZoneRateLimitListResponseSuccess `json:"success"` - JSON zoneRateLimitListResponseJSON `json:"-"` -} - -// zoneRateLimitListResponseJSON contains the JSON metadata for the struct -// [ZoneRateLimitListResponse] -type zoneRateLimitListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - ResultInfo apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneRateLimitListResponseErrorJSON `json:"-"` -} - -// zoneRateLimitListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneRateLimitListResponseError] -type zoneRateLimitListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneRateLimitListResponseMessageJSON `json:"-"` -} - -// zoneRateLimitListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneRateLimitListResponseMessage] -type zoneRateLimitListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseResult struct { - // The unique identifier of the rate limit. - ID string `json:"id"` - // The action to perform when the threshold of matched traffic within the - // configured period is exceeded. - Action ZoneRateLimitListResponseResultAction `json:"action"` - // Criteria specifying when the current rate limit should be bypassed. You can - // specify that the rate limit should not apply to one or more URLs. - Bypass []ZoneRateLimitListResponseResultBypass `json:"bypass"` - // An informative summary of the rate limit. This value is sanitized and any tags - // will be removed. - Description string `json:"description"` - // When true, indicates that the rate limit is currently disabled. - Disabled bool `json:"disabled"` - // Determines which traffic the rate limit counts towards the threshold. - Match ZoneRateLimitListResponseResultMatch `json:"match"` - // The time in seconds (an integer value) to count matching traffic. If the count - // exceeds the configured threshold within this period, Cloudflare will perform the - // configured action. - Period float64 `json:"period"` - // The threshold that will trigger the configured mitigation action. Configure this - // value along with the `period` property to establish a threshold per period. - Threshold float64 `json:"threshold"` - JSON zoneRateLimitListResponseResultJSON `json:"-"` -} - -// zoneRateLimitListResponseResultJSON contains the JSON metadata for the struct -// [ZoneRateLimitListResponseResult] -type zoneRateLimitListResponseResultJSON struct { - ID apijson.Field - Action apijson.Field - Bypass apijson.Field - Description apijson.Field - Disabled apijson.Field - Match apijson.Field - Period apijson.Field - Threshold apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The action to perform when the threshold of matched traffic within the -// configured period is exceeded. -type ZoneRateLimitListResponseResultAction struct { - // The action to perform. - Mode ZoneRateLimitListResponseResultActionMode `json:"mode"` - // A custom content type and reponse to return when the threshold is exceeded. The - // custom response configured in this object will override the custom error for the - // zone. This object is optional. Notes: If you omit this object, Cloudflare will - // use the default HTML error page. If "mode" is "challenge", "managed_challenge", - // or "js_challenge", Cloudflare will use the zone challenge pages and you should - // not provide the "response" object. - Response ZoneRateLimitListResponseResultActionResponse `json:"response"` - // The time in seconds during which Cloudflare will perform the mitigation action. - // Must be an integer value greater than or equal to the period. Notes: If "mode" - // is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the - // zone's Challenge Passage time and you should not provide this value. - Timeout float64 `json:"timeout"` - JSON zoneRateLimitListResponseResultActionJSON `json:"-"` -} - -// zoneRateLimitListResponseResultActionJSON contains the JSON metadata for the -// struct [ZoneRateLimitListResponseResultAction] -type zoneRateLimitListResponseResultActionJSON struct { - Mode apijson.Field - Response apijson.Field - Timeout apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultAction) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The action to perform. -type ZoneRateLimitListResponseResultActionMode string - -const ( - ZoneRateLimitListResponseResultActionModeSimulate ZoneRateLimitListResponseResultActionMode = "simulate" - ZoneRateLimitListResponseResultActionModeBan ZoneRateLimitListResponseResultActionMode = "ban" - ZoneRateLimitListResponseResultActionModeChallenge ZoneRateLimitListResponseResultActionMode = "challenge" - ZoneRateLimitListResponseResultActionModeJsChallenge ZoneRateLimitListResponseResultActionMode = "js_challenge" - ZoneRateLimitListResponseResultActionModeManagedChallenge ZoneRateLimitListResponseResultActionMode = "managed_challenge" -) - -// A custom content type and reponse to return when the threshold is exceeded. The -// custom response configured in this object will override the custom error for the -// zone. This object is optional. Notes: If you omit this object, Cloudflare will -// use the default HTML error page. If "mode" is "challenge", "managed_challenge", -// or "js_challenge", Cloudflare will use the zone challenge pages and you should -// not provide the "response" object. -type ZoneRateLimitListResponseResultActionResponse struct { - // The response body to return. The value must conform to the configured content - // type. - Body string `json:"body"` - // The content type of the body. Must be one of the following: `text/plain`, - // `text/xml`, or `application/json`. - ContentType string `json:"content_type"` - JSON zoneRateLimitListResponseResultActionResponseJSON `json:"-"` -} - -// zoneRateLimitListResponseResultActionResponseJSON contains the JSON metadata for -// the struct [ZoneRateLimitListResponseResultActionResponse] -type zoneRateLimitListResponseResultActionResponseJSON struct { - Body apijson.Field - ContentType apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultActionResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseResultBypass struct { - Name ZoneRateLimitListResponseResultBypassName `json:"name"` - // The URL to bypass. - Value string `json:"value"` - JSON zoneRateLimitListResponseResultBypassJSON `json:"-"` -} - -// zoneRateLimitListResponseResultBypassJSON contains the JSON metadata for the -// struct [ZoneRateLimitListResponseResultBypass] -type zoneRateLimitListResponseResultBypassJSON struct { - Name apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultBypass) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseResultBypassName string - -const ( - ZoneRateLimitListResponseResultBypassNameURL ZoneRateLimitListResponseResultBypassName = "url" -) - -// Determines which traffic the rate limit counts towards the threshold. -type ZoneRateLimitListResponseResultMatch struct { - Headers []ZoneRateLimitListResponseResultMatchHeader `json:"headers"` - Request ZoneRateLimitListResponseResultMatchRequest `json:"request"` - Response ZoneRateLimitListResponseResultMatchResponse `json:"response"` - JSON zoneRateLimitListResponseResultMatchJSON `json:"-"` -} - -// zoneRateLimitListResponseResultMatchJSON contains the JSON metadata for the -// struct [ZoneRateLimitListResponseResultMatch] -type zoneRateLimitListResponseResultMatchJSON struct { - Headers apijson.Field - Request apijson.Field - Response apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultMatch) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseResultMatchHeader struct { - // The name of the response header to match. - Name string `json:"name"` - // The operator used when matching: `eq` means "equal" and `ne` means "not equal". - Op ZoneRateLimitListResponseResultMatchHeadersOp `json:"op"` - // The value of the response header, which must match exactly. - Value string `json:"value"` - JSON zoneRateLimitListResponseResultMatchHeaderJSON `json:"-"` -} - -// zoneRateLimitListResponseResultMatchHeaderJSON contains the JSON metadata for -// the struct [ZoneRateLimitListResponseResultMatchHeader] -type zoneRateLimitListResponseResultMatchHeaderJSON struct { - Name apijson.Field - Op apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultMatchHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The operator used when matching: `eq` means "equal" and `ne` means "not equal". -type ZoneRateLimitListResponseResultMatchHeadersOp string - -const ( - ZoneRateLimitListResponseResultMatchHeadersOpEq ZoneRateLimitListResponseResultMatchHeadersOp = "eq" - ZoneRateLimitListResponseResultMatchHeadersOpNe ZoneRateLimitListResponseResultMatchHeadersOp = "ne" -) - -type ZoneRateLimitListResponseResultMatchRequest struct { - // The HTTP methods to match. You can specify a subset (for example, - // `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when - // creating a rate limit. - Methods []ZoneRateLimitListResponseResultMatchRequestMethod `json:"methods"` - // The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both - // schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is - // optional. - Schemes []string `json:"schemes"` - // The URL pattern to match, composed of a host and a path such as - // `example.org/path*`. Normalization is applied before the pattern is matched. `*` - // wildcards are expanded to match applicable traffic. Query strings are not - // matched. Set the value to `*` to match all traffic to your zone. - URL string `json:"url"` - JSON zoneRateLimitListResponseResultMatchRequestJSON `json:"-"` -} - -// zoneRateLimitListResponseResultMatchRequestJSON contains the JSON metadata for -// the struct [ZoneRateLimitListResponseResultMatchRequest] -type zoneRateLimitListResponseResultMatchRequestJSON struct { - Methods apijson.Field - Schemes apijson.Field - URL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultMatchRequest) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// An HTTP method or `_ALL_` to indicate all methods. -type ZoneRateLimitListResponseResultMatchRequestMethod string - -const ( - ZoneRateLimitListResponseResultMatchRequestMethodGet ZoneRateLimitListResponseResultMatchRequestMethod = "GET" - ZoneRateLimitListResponseResultMatchRequestMethodPost ZoneRateLimitListResponseResultMatchRequestMethod = "POST" - ZoneRateLimitListResponseResultMatchRequestMethodPut ZoneRateLimitListResponseResultMatchRequestMethod = "PUT" - ZoneRateLimitListResponseResultMatchRequestMethodDelete ZoneRateLimitListResponseResultMatchRequestMethod = "DELETE" - ZoneRateLimitListResponseResultMatchRequestMethodPatch ZoneRateLimitListResponseResultMatchRequestMethod = "PATCH" - ZoneRateLimitListResponseResultMatchRequestMethodHead ZoneRateLimitListResponseResultMatchRequestMethod = "HEAD" - ZoneRateLimitListResponseResultMatchRequestMethod_All ZoneRateLimitListResponseResultMatchRequestMethod = "_ALL_" -) - -type ZoneRateLimitListResponseResultMatchResponse struct { - // When true, only the uncached traffic served from your origin servers will count - // towards rate limiting. In this case, any cached traffic served by Cloudflare - // will not count towards rate limiting. This field is optional. Notes: This field - // is deprecated. Instead, use response headers and set "origin_traffic" to "false" - // to avoid legacy behaviour interacting with the "response_headers" property. - OriginTraffic bool `json:"origin_traffic"` - JSON zoneRateLimitListResponseResultMatchResponseJSON `json:"-"` -} - -// zoneRateLimitListResponseResultMatchResponseJSON contains the JSON metadata for -// the struct [ZoneRateLimitListResponseResultMatchResponse] -type zoneRateLimitListResponseResultMatchResponseJSON struct { - OriginTraffic apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultMatchResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneRateLimitListResponseResultInfo struct { - // Total number of results for the requested service - Count float64 `json:"count"` - // Current page within paginated list of results - Page float64 `json:"page"` - // Number of results per page of results - PerPage float64 `json:"per_page"` - // Total results available without any search parameters - TotalCount float64 `json:"total_count"` - JSON zoneRateLimitListResponseResultInfoJSON `json:"-"` -} - -// zoneRateLimitListResponseResultInfoJSON contains the JSON metadata for the -// struct [ZoneRateLimitListResponseResultInfo] -type zoneRateLimitListResponseResultInfoJSON struct { - Count apijson.Field - Page apijson.Field - PerPage apijson.Field - TotalCount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneRateLimitListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether the API call was successful -type ZoneRateLimitListResponseSuccess bool - -const ( - ZoneRateLimitListResponseSuccessTrue ZoneRateLimitListResponseSuccess = true -) - -type ZoneRateLimitListParams struct { - // The page number of paginated results. - Page param.Field[float64] `query:"page"` - // The maximum number of results per page. You can only set the value to `1` or to - // a multiple of 5 such as `5`, `10`, `15`, or `20`. - PerPage param.Field[float64] `query:"per_page"` -} - -// URLQuery serializes [ZoneRateLimitListParams]'s query parameters as -// `url.Values`. -func (r ZoneRateLimitListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatComma, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} diff --git a/zonesetting.go b/zonesetting.go deleted file mode 100644 index 47262fe2642..00000000000 --- a/zonesetting.go +++ /dev/null @@ -1,9511 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "reflect" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingService] method -// instead. -type ZoneSettingService struct { - Options []option.RequestOption - AdvancedDDOS *ZoneSettingAdvancedDDOSService - AlwaysOnline *ZoneSettingAlwaysOnlineService - AlwaysUseHTTPs *ZoneSettingAlwaysUseHTTPService - AutomaticHTTPsRewrites *ZoneSettingAutomaticHTTPsRewriteService - AutomaticPlatformOptimization *ZoneSettingAutomaticPlatformOptimizationService - Brotli *ZoneSettingBrotliService - BrowserCacheTTLs *ZoneSettingBrowserCacheTTLService - BrowserChecks *ZoneSettingBrowserCheckService - CacheLevels *ZoneSettingCacheLevelService - ChallengeTTLs *ZoneSettingChallengeTTLService - Ciphers *ZoneSettingCipherService - DevelopmentModes *ZoneSettingDevelopmentModeService - EarlyHints *ZoneSettingEarlyHintService - EmailObfuscations *ZoneSettingEmailObfuscationService - H2Prioritizations *ZoneSettingH2PrioritizationService - HotlinkProtections *ZoneSettingHotlinkProtectionService - HTTP2s *ZoneSettingHTTP2Service - HTTP3s *ZoneSettingHTTP3Service - ImageResizings *ZoneSettingImageResizingService - IPGeolocations *ZoneSettingIPGeolocationService - IPV6s *ZoneSettingIPV6Service - MinTLSVersions *ZoneSettingMinTLSVersionService - Minifies *ZoneSettingMinifyService - Mirages *ZoneSettingMirageService - MobileRedirects *ZoneSettingMobileRedirectService - NELs *ZoneSettingNELService - OpportunisticEncryptions *ZoneSettingOpportunisticEncryptionService - OpportunisticOnions *ZoneSettingOpportunisticOnionService - OrangeToOranges *ZoneSettingOrangeToOrangeService - OriginErrorPagePassThrus *ZoneSettingOriginErrorPagePassThrusService - OriginMaxHTTPVersions *ZoneSettingOriginMaxHTTPVersionService - Polishes *ZoneSettingPolishService - PrefetchPreloads *ZoneSettingPrefetchPreloadService - PrivacyPasses *ZoneSettingPrivacyPassService - ProxyReadTimeouts *ZoneSettingProxyReadTimeoutService - PseudoIpv4s *ZoneSettingPseudoIpv4Service - ResponseBufferings *ZoneSettingResponseBufferingService - RocketLoaders *ZoneSettingRocketLoaderService - SecurityHeaders *ZoneSettingSecurityHeaderService - SecurityLevels *ZoneSettingSecurityLevelService - ServerSideExcludes *ZoneSettingServerSideExcludeService - SortQueryStringForCaches *ZoneSettingSortQueryStringForCachService - SSLs *ZoneSettingSSLService - SSLRecommenders *ZoneSettingSSLRecommenderService - TLS1_3s *ZoneSettingTLS1_3Service - TLSClientAuths *ZoneSettingTLSClientAuthService - TrueClientIPHeaders *ZoneSettingTrueClientIPHeaderService - WAFs *ZoneSettingWAFService - Webps *ZoneSettingWebpService - Websockets *ZoneSettingWebsocketService -} - -// NewZoneSettingService generates a new service that applies the given options to -// each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingService(opts ...option.RequestOption) (r *ZoneSettingService) { - r = &ZoneSettingService{} - r.Options = opts - r.AdvancedDDOS = NewZoneSettingAdvancedDDOSService(opts...) - r.AlwaysOnline = NewZoneSettingAlwaysOnlineService(opts...) - r.AlwaysUseHTTPs = NewZoneSettingAlwaysUseHTTPService(opts...) - r.AutomaticHTTPsRewrites = NewZoneSettingAutomaticHTTPsRewriteService(opts...) - r.AutomaticPlatformOptimization = NewZoneSettingAutomaticPlatformOptimizationService(opts...) - r.Brotli = NewZoneSettingBrotliService(opts...) - r.BrowserCacheTTLs = NewZoneSettingBrowserCacheTTLService(opts...) - r.BrowserChecks = NewZoneSettingBrowserCheckService(opts...) - r.CacheLevels = NewZoneSettingCacheLevelService(opts...) - r.ChallengeTTLs = NewZoneSettingChallengeTTLService(opts...) - r.Ciphers = NewZoneSettingCipherService(opts...) - r.DevelopmentModes = NewZoneSettingDevelopmentModeService(opts...) - r.EarlyHints = NewZoneSettingEarlyHintService(opts...) - r.EmailObfuscations = NewZoneSettingEmailObfuscationService(opts...) - r.H2Prioritizations = NewZoneSettingH2PrioritizationService(opts...) - r.HotlinkProtections = NewZoneSettingHotlinkProtectionService(opts...) - r.HTTP2s = NewZoneSettingHTTP2Service(opts...) - r.HTTP3s = NewZoneSettingHTTP3Service(opts...) - r.ImageResizings = NewZoneSettingImageResizingService(opts...) - r.IPGeolocations = NewZoneSettingIPGeolocationService(opts...) - r.IPV6s = NewZoneSettingIPV6Service(opts...) - r.MinTLSVersions = NewZoneSettingMinTLSVersionService(opts...) - r.Minifies = NewZoneSettingMinifyService(opts...) - r.Mirages = NewZoneSettingMirageService(opts...) - r.MobileRedirects = NewZoneSettingMobileRedirectService(opts...) - r.NELs = NewZoneSettingNELService(opts...) - r.OpportunisticEncryptions = NewZoneSettingOpportunisticEncryptionService(opts...) - r.OpportunisticOnions = NewZoneSettingOpportunisticOnionService(opts...) - r.OrangeToOranges = NewZoneSettingOrangeToOrangeService(opts...) - r.OriginErrorPagePassThrus = NewZoneSettingOriginErrorPagePassThrusService(opts...) - r.OriginMaxHTTPVersions = NewZoneSettingOriginMaxHTTPVersionService(opts...) - r.Polishes = NewZoneSettingPolishService(opts...) - r.PrefetchPreloads = NewZoneSettingPrefetchPreloadService(opts...) - r.PrivacyPasses = NewZoneSettingPrivacyPassService(opts...) - r.ProxyReadTimeouts = NewZoneSettingProxyReadTimeoutService(opts...) - r.PseudoIpv4s = NewZoneSettingPseudoIpv4Service(opts...) - r.ResponseBufferings = NewZoneSettingResponseBufferingService(opts...) - r.RocketLoaders = NewZoneSettingRocketLoaderService(opts...) - r.SecurityHeaders = NewZoneSettingSecurityHeaderService(opts...) - r.SecurityLevels = NewZoneSettingSecurityLevelService(opts...) - r.ServerSideExcludes = NewZoneSettingServerSideExcludeService(opts...) - r.SortQueryStringForCaches = NewZoneSettingSortQueryStringForCachService(opts...) - r.SSLs = NewZoneSettingSSLService(opts...) - r.SSLRecommenders = NewZoneSettingSSLRecommenderService(opts...) - r.TLS1_3s = NewZoneSettingTLS1_3Service(opts...) - r.TLSClientAuths = NewZoneSettingTLSClientAuthService(opts...) - r.TrueClientIPHeaders = NewZoneSettingTrueClientIPHeaderService(opts...) - r.WAFs = NewZoneSettingWAFService(opts...) - r.Webps = NewZoneSettingWebpService(opts...) - r.Websockets = NewZoneSettingWebsocketService(opts...) - return -} - -// Available settings for your user in relation to a zone. -func (r *ZoneSettingService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -// Edit settings for a zone. -func (r *ZoneSettingService) Edit(ctx context.Context, zoneIdentifier string, body ZoneSettingEditParams, opts ...option.RequestOption) (res *ZoneSettingEditResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -type ZoneSettingListResponse struct { - Errors []ZoneSettingListResponseError `json:"errors"` - Messages []ZoneSettingListResponseMessage `json:"messages"` - Result []ZoneSettingListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingListResponseJSON `json:"-"` -} - -// zoneSettingListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingListResponse] -type zoneSettingListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingListResponseErrorJSON `json:"-"` -} - -// zoneSettingListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingListResponseError] -type zoneSettingListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingListResponseMessageJSON `json:"-"` -} - -// zoneSettingListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingListResponseMessage] -type zoneSettingListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// 0-RTT session resumption enabled for this zone. -// -// Union satisfied by [ZoneSettingListResponseResultZones0rtt], -// [ZoneSettingListResponseResultZonesAdvancedDDOS], -// [ZoneSettingListResponseResultZonesAlwaysOnline], -// [ZoneSettingListResponseResultZonesAlwaysUseHTTPs], -// [ZoneSettingListResponseResultZonesAutomaticHTTPsRewrites], -// [ZoneSettingListResponseResultZonesBrotli], -// [ZoneSettingListResponseResultZonesBrowserCacheTTL], -// [ZoneSettingListResponseResultZonesBrowserCheck], -// [ZoneSettingListResponseResultZonesCacheLevel], -// [ZoneSettingListResponseResultZonesChallengeTTL], -// [ZoneSettingListResponseResultZonesCiphers], -// [ZoneSettingListResponseResultZonesCnameFlattening], -// [ZoneSettingListResponseResultZonesDevelopmentMode], -// [ZoneSettingListResponseResultZonesEarlyHints], -// [ZoneSettingListResponseResultZonesEdgeCacheTTL], -// [ZoneSettingListResponseResultZonesEmailObfuscation], -// [ZoneSettingListResponseResultZonesH2Prioritization], -// [ZoneSettingListResponseResultZonesHotlinkProtection], -// [ZoneSettingListResponseResultZonesHTTP2], -// [ZoneSettingListResponseResultZonesHTTP3], -// [ZoneSettingListResponseResultZonesImageResizing], -// [ZoneSettingListResponseResultZonesIPGeolocation], -// [ZoneSettingListResponseResultZonesIPV6], -// [ZoneSettingListResponseResultZonesMaxUpload], -// [ZoneSettingListResponseResultZonesMinTLSVersion], -// [ZoneSettingListResponseResultZonesMinify], -// [ZoneSettingListResponseResultZonesMirage], -// [ZoneSettingListResponseResultZonesMobileRedirect], -// [ZoneSettingListResponseResultZonesNEL], -// [ZoneSettingListResponseResultZonesOpportunisticEncryption], -// [ZoneSettingListResponseResultZonesOpportunisticOnion], -// [ZoneSettingListResponseResultZonesOrangeToOrange], -// [ZoneSettingListResponseResultZonesOriginErrorPagePassThru], -// [ZoneSettingListResponseResultZonesOriginMaxHTTPVersion], -// [ZoneSettingListResponseResultZonesPolish], -// [ZoneSettingListResponseResultZonesPrefetchPreload], -// [ZoneSettingListResponseResultZonesProxyReadTimeout], -// [ZoneSettingListResponseResultZonesPseudoIpv4], -// [ZoneSettingListResponseResultZonesResponseBuffering], -// [ZoneSettingListResponseResultZonesRocketLoader], -// [ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimization], -// [ZoneSettingListResponseResultZonesSecurityHeader], -// [ZoneSettingListResponseResultZonesSecurityLevel], -// [ZoneSettingListResponseResultZonesServerSideExclude], -// [ZoneSettingListResponseResultZonesSha1Support], -// [ZoneSettingListResponseResultZonesSortQueryStringForCache], -// [ZoneSettingListResponseResultZonesSSL], -// [ZoneSettingListResponseResultZonesSSLRecommender], -// [ZoneSettingListResponseResultZonesTLS1_2Only], -// [ZoneSettingListResponseResultZonesTLS1_3], -// [ZoneSettingListResponseResultZonesTLSClientAuth], -// [ZoneSettingListResponseResultZonesTrueClientIPHeader], -// [ZoneSettingListResponseResultZonesWAF], -// [ZoneSettingListResponseResultZonesWebp] or -// [ZoneSettingListResponseResultZonesWebsockets]. -type ZoneSettingListResponseResult interface { - implementsZoneSettingListResponseResult() -} - -func init() { - apijson.RegisterUnion(reflect.TypeOf((*ZoneSettingListResponseResult)(nil)).Elem(), "") -} - -// 0-RTT session resumption enabled for this zone. -type ZoneSettingListResponseResultZones0rtt struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZones0rttID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZones0rttEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the 0-RTT setting. - Value ZoneSettingListResponseResultZones0rttValue `json:"value"` - JSON zoneSettingListResponseResultZones0rttJSON `json:"-"` -} - -// zoneSettingListResponseResultZones0rttJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZones0rtt] -type zoneSettingListResponseResultZones0rttJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZones0rtt) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZones0rtt) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZones0rttID string - -const ( - ZoneSettingListResponseResultZones0rttID0rtt ZoneSettingListResponseResultZones0rttID = "0rtt" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZones0rttEditable bool - -const ( - ZoneSettingListResponseResultZones0rttEditableTrue ZoneSettingListResponseResultZones0rttEditable = true - ZoneSettingListResponseResultZones0rttEditableFalse ZoneSettingListResponseResultZones0rttEditable = false -) - -// Value of the 0-RTT setting. -type ZoneSettingListResponseResultZones0rttValue string - -const ( - ZoneSettingListResponseResultZones0rttValueOn ZoneSettingListResponseResultZones0rttValue = "on" - ZoneSettingListResponseResultZones0rttValueOff ZoneSettingListResponseResultZones0rttValue = "off" -) - -// Advanced protection from Distributed Denial of Service (DDoS) attacks on your -// website. This is an uneditable value that is 'on' in the case of Business and -// Enterprise zones. -type ZoneSettingListResponseResultZonesAdvancedDDOS struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesAdvancedDDOSID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesAdvancedDDOSEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Defaults to on for Business+ plans - Value ZoneSettingListResponseResultZonesAdvancedDDOSValue `json:"value"` - JSON zoneSettingListResponseResultZonesAdvancedDDOSJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesAdvancedDDOSJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesAdvancedDDOS] -type zoneSettingListResponseResultZonesAdvancedDDOSJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesAdvancedDDOS) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesAdvancedDDOS) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesAdvancedDDOSID string - -const ( - ZoneSettingListResponseResultZonesAdvancedDDOSIDAdvancedDDOS ZoneSettingListResponseResultZonesAdvancedDDOSID = "advanced_ddos" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesAdvancedDDOSEditable bool - -const ( - ZoneSettingListResponseResultZonesAdvancedDDOSEditableTrue ZoneSettingListResponseResultZonesAdvancedDDOSEditable = true - ZoneSettingListResponseResultZonesAdvancedDDOSEditableFalse ZoneSettingListResponseResultZonesAdvancedDDOSEditable = false -) - -// Value of the zone setting. Notes: Defaults to on for Business+ plans -type ZoneSettingListResponseResultZonesAdvancedDDOSValue string - -const ( - ZoneSettingListResponseResultZonesAdvancedDDOSValueOn ZoneSettingListResponseResultZonesAdvancedDDOSValue = "on" - ZoneSettingListResponseResultZonesAdvancedDDOSValueOff ZoneSettingListResponseResultZonesAdvancedDDOSValue = "off" -) - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -type ZoneSettingListResponseResultZonesAlwaysOnline struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesAlwaysOnlineID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesAlwaysOnlineEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesAlwaysOnlineValue `json:"value"` - JSON zoneSettingListResponseResultZonesAlwaysOnlineJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesAlwaysOnlineJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesAlwaysOnline] -type zoneSettingListResponseResultZonesAlwaysOnlineJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesAlwaysOnline) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesAlwaysOnline) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesAlwaysOnlineID string - -const ( - ZoneSettingListResponseResultZonesAlwaysOnlineIDAlwaysOnline ZoneSettingListResponseResultZonesAlwaysOnlineID = "always_online" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesAlwaysOnlineEditable bool - -const ( - ZoneSettingListResponseResultZonesAlwaysOnlineEditableTrue ZoneSettingListResponseResultZonesAlwaysOnlineEditable = true - ZoneSettingListResponseResultZonesAlwaysOnlineEditableFalse ZoneSettingListResponseResultZonesAlwaysOnlineEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesAlwaysOnlineValue string - -const ( - ZoneSettingListResponseResultZonesAlwaysOnlineValueOn ZoneSettingListResponseResultZonesAlwaysOnlineValue = "on" - ZoneSettingListResponseResultZonesAlwaysOnlineValueOff ZoneSettingListResponseResultZonesAlwaysOnlineValue = "off" -) - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -type ZoneSettingListResponseResultZonesAlwaysUseHTTPs struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesAlwaysUseHTTPsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesAlwaysUseHTTPsValue `json:"value"` - JSON zoneSettingListResponseResultZonesAlwaysUseHTTPsJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesAlwaysUseHTTPsJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesAlwaysUseHTTPs] -type zoneSettingListResponseResultZonesAlwaysUseHTTPsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesAlwaysUseHTTPs) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesAlwaysUseHTTPs) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesAlwaysUseHTTPsID string - -const ( - ZoneSettingListResponseResultZonesAlwaysUseHTTPsIDAlwaysUseHTTPs ZoneSettingListResponseResultZonesAlwaysUseHTTPsID = "always_use_https" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditable bool - -const ( - ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditableTrue ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditable = true - ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditableFalse ZoneSettingListResponseResultZonesAlwaysUseHTTPsEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesAlwaysUseHTTPsValue string - -const ( - ZoneSettingListResponseResultZonesAlwaysUseHTTPsValueOn ZoneSettingListResponseResultZonesAlwaysUseHTTPsValue = "on" - ZoneSettingListResponseResultZonesAlwaysUseHTTPsValueOff ZoneSettingListResponseResultZonesAlwaysUseHTTPsValue = "off" -) - -// Enable the Automatic HTTPS Rewrites feature for this zone. -type ZoneSettingListResponseResultZonesAutomaticHTTPsRewrites struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValue `json:"value"` - JSON zoneSettingListResponseResultZonesAutomaticHTTPsRewritesJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesAutomaticHTTPsRewritesJSON contains the JSON -// metadata for the struct -// [ZoneSettingListResponseResultZonesAutomaticHTTPsRewrites] -type zoneSettingListResponseResultZonesAutomaticHTTPsRewritesJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesAutomaticHTTPsRewrites) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesAutomaticHTTPsRewrites) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesID string - -const ( - ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesIDAutomaticHTTPsRewrites ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesID = "automatic_https_rewrites" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditable bool - -const ( - ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditableTrue ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditable = true - ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditableFalse ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValue string - -const ( - ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValueOn ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValue = "on" - ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValueOff ZoneSettingListResponseResultZonesAutomaticHTTPsRewritesValue = "off" -) - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -type ZoneSettingListResponseResultZonesBrotli struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesBrotliID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesBrotliEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesBrotliValue `json:"value"` - JSON zoneSettingListResponseResultZonesBrotliJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesBrotliJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesBrotli] -type zoneSettingListResponseResultZonesBrotliJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesBrotli) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesBrotli) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesBrotliID string - -const ( - ZoneSettingListResponseResultZonesBrotliIDBrotli ZoneSettingListResponseResultZonesBrotliID = "brotli" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesBrotliEditable bool - -const ( - ZoneSettingListResponseResultZonesBrotliEditableTrue ZoneSettingListResponseResultZonesBrotliEditable = true - ZoneSettingListResponseResultZonesBrotliEditableFalse ZoneSettingListResponseResultZonesBrotliEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesBrotliValue string - -const ( - ZoneSettingListResponseResultZonesBrotliValueOff ZoneSettingListResponseResultZonesBrotliValue = "off" - ZoneSettingListResponseResultZonesBrotliValueOn ZoneSettingListResponseResultZonesBrotliValue = "on" -) - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -type ZoneSettingListResponseResultZonesBrowserCacheTTL struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesBrowserCacheTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesBrowserCacheTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value ZoneSettingListResponseResultZonesBrowserCacheTTLValue `json:"value"` - JSON zoneSettingListResponseResultZonesBrowserCacheTTLJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesBrowserCacheTTLJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesBrowserCacheTTL] -type zoneSettingListResponseResultZonesBrowserCacheTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesBrowserCacheTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesBrowserCacheTTL) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesBrowserCacheTTLID string - -const ( - ZoneSettingListResponseResultZonesBrowserCacheTTLIDBrowserCacheTTL ZoneSettingListResponseResultZonesBrowserCacheTTLID = "browser_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesBrowserCacheTTLEditable bool - -const ( - ZoneSettingListResponseResultZonesBrowserCacheTTLEditableTrue ZoneSettingListResponseResultZonesBrowserCacheTTLEditable = true - ZoneSettingListResponseResultZonesBrowserCacheTTLEditableFalse ZoneSettingListResponseResultZonesBrowserCacheTTLEditable = false -) - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingListResponseResultZonesBrowserCacheTTLValue float64 - -const ( - ZoneSettingListResponseResultZonesBrowserCacheTTLValue0 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 0 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue30 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 30 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue60 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 60 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue120 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 120 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue300 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 300 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue1200 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 1200 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue1800 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 1800 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue3600 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 3600 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue7200 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 7200 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue10800 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 10800 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue14400 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 14400 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue18000 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 18000 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue28800 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 28800 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue43200 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 43200 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue57600 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 57600 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue72000 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 72000 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue86400 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 86400 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue172800 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 172800 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue259200 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 259200 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue345600 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 345600 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue432000 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 432000 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue691200 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 691200 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue1382400 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 1382400 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue2073600 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 2073600 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue2678400 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 2678400 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue5356800 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 5356800 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue16070400 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 16070400 - ZoneSettingListResponseResultZonesBrowserCacheTTLValue31536000 ZoneSettingListResponseResultZonesBrowserCacheTTLValue = 31536000 -) - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -type ZoneSettingListResponseResultZonesBrowserCheck struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesBrowserCheckID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesBrowserCheckEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesBrowserCheckValue `json:"value"` - JSON zoneSettingListResponseResultZonesBrowserCheckJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesBrowserCheckJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesBrowserCheck] -type zoneSettingListResponseResultZonesBrowserCheckJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesBrowserCheck) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesBrowserCheck) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesBrowserCheckID string - -const ( - ZoneSettingListResponseResultZonesBrowserCheckIDBrowserCheck ZoneSettingListResponseResultZonesBrowserCheckID = "browser_check" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesBrowserCheckEditable bool - -const ( - ZoneSettingListResponseResultZonesBrowserCheckEditableTrue ZoneSettingListResponseResultZonesBrowserCheckEditable = true - ZoneSettingListResponseResultZonesBrowserCheckEditableFalse ZoneSettingListResponseResultZonesBrowserCheckEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesBrowserCheckValue string - -const ( - ZoneSettingListResponseResultZonesBrowserCheckValueOn ZoneSettingListResponseResultZonesBrowserCheckValue = "on" - ZoneSettingListResponseResultZonesBrowserCheckValueOff ZoneSettingListResponseResultZonesBrowserCheckValue = "off" -) - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -type ZoneSettingListResponseResultZonesCacheLevel struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesCacheLevelID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesCacheLevelEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesCacheLevelValue `json:"value"` - JSON zoneSettingListResponseResultZonesCacheLevelJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesCacheLevelJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesCacheLevel] -type zoneSettingListResponseResultZonesCacheLevelJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesCacheLevel) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesCacheLevel) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesCacheLevelID string - -const ( - ZoneSettingListResponseResultZonesCacheLevelIDCacheLevel ZoneSettingListResponseResultZonesCacheLevelID = "cache_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesCacheLevelEditable bool - -const ( - ZoneSettingListResponseResultZonesCacheLevelEditableTrue ZoneSettingListResponseResultZonesCacheLevelEditable = true - ZoneSettingListResponseResultZonesCacheLevelEditableFalse ZoneSettingListResponseResultZonesCacheLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesCacheLevelValue string - -const ( - ZoneSettingListResponseResultZonesCacheLevelValueAggressive ZoneSettingListResponseResultZonesCacheLevelValue = "aggressive" - ZoneSettingListResponseResultZonesCacheLevelValueBasic ZoneSettingListResponseResultZonesCacheLevelValue = "basic" - ZoneSettingListResponseResultZonesCacheLevelValueSimplified ZoneSettingListResponseResultZonesCacheLevelValue = "simplified" -) - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -type ZoneSettingListResponseResultZonesChallengeTTL struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesChallengeTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesChallengeTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesChallengeTTLValue `json:"value"` - JSON zoneSettingListResponseResultZonesChallengeTTLJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesChallengeTTLJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesChallengeTTL] -type zoneSettingListResponseResultZonesChallengeTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesChallengeTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesChallengeTTL) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesChallengeTTLID string - -const ( - ZoneSettingListResponseResultZonesChallengeTTLIDChallengeTTL ZoneSettingListResponseResultZonesChallengeTTLID = "challenge_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesChallengeTTLEditable bool - -const ( - ZoneSettingListResponseResultZonesChallengeTTLEditableTrue ZoneSettingListResponseResultZonesChallengeTTLEditable = true - ZoneSettingListResponseResultZonesChallengeTTLEditableFalse ZoneSettingListResponseResultZonesChallengeTTLEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesChallengeTTLValue float64 - -const ( - ZoneSettingListResponseResultZonesChallengeTTLValue300 ZoneSettingListResponseResultZonesChallengeTTLValue = 300 - ZoneSettingListResponseResultZonesChallengeTTLValue900 ZoneSettingListResponseResultZonesChallengeTTLValue = 900 - ZoneSettingListResponseResultZonesChallengeTTLValue1800 ZoneSettingListResponseResultZonesChallengeTTLValue = 1800 - ZoneSettingListResponseResultZonesChallengeTTLValue2700 ZoneSettingListResponseResultZonesChallengeTTLValue = 2700 - ZoneSettingListResponseResultZonesChallengeTTLValue3600 ZoneSettingListResponseResultZonesChallengeTTLValue = 3600 - ZoneSettingListResponseResultZonesChallengeTTLValue7200 ZoneSettingListResponseResultZonesChallengeTTLValue = 7200 - ZoneSettingListResponseResultZonesChallengeTTLValue10800 ZoneSettingListResponseResultZonesChallengeTTLValue = 10800 - ZoneSettingListResponseResultZonesChallengeTTLValue14400 ZoneSettingListResponseResultZonesChallengeTTLValue = 14400 - ZoneSettingListResponseResultZonesChallengeTTLValue28800 ZoneSettingListResponseResultZonesChallengeTTLValue = 28800 - ZoneSettingListResponseResultZonesChallengeTTLValue57600 ZoneSettingListResponseResultZonesChallengeTTLValue = 57600 - ZoneSettingListResponseResultZonesChallengeTTLValue86400 ZoneSettingListResponseResultZonesChallengeTTLValue = 86400 - ZoneSettingListResponseResultZonesChallengeTTLValue604800 ZoneSettingListResponseResultZonesChallengeTTLValue = 604800 - ZoneSettingListResponseResultZonesChallengeTTLValue2592000 ZoneSettingListResponseResultZonesChallengeTTLValue = 2592000 - ZoneSettingListResponseResultZonesChallengeTTLValue31536000 ZoneSettingListResponseResultZonesChallengeTTLValue = 31536000 -) - -// An allowlist of ciphers for TLS termination. These ciphers must be in the -// BoringSSL format. -type ZoneSettingListResponseResultZonesCiphers struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesCiphersID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesCiphersEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value []string `json:"value"` - JSON zoneSettingListResponseResultZonesCiphersJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesCiphersJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesCiphers] -type zoneSettingListResponseResultZonesCiphersJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesCiphers) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesCiphers) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesCiphersID string - -const ( - ZoneSettingListResponseResultZonesCiphersIDCiphers ZoneSettingListResponseResultZonesCiphersID = "ciphers" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesCiphersEditable bool - -const ( - ZoneSettingListResponseResultZonesCiphersEditableTrue ZoneSettingListResponseResultZonesCiphersEditable = true - ZoneSettingListResponseResultZonesCiphersEditableFalse ZoneSettingListResponseResultZonesCiphersEditable = false -) - -// Whether or not cname flattening is on. -type ZoneSettingListResponseResultZonesCnameFlattening struct { - // How to flatten the cname destination. - ID ZoneSettingListResponseResultZonesCnameFlatteningID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesCnameFlatteningEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the cname flattening setting. - Value ZoneSettingListResponseResultZonesCnameFlatteningValue `json:"value"` - JSON zoneSettingListResponseResultZonesCnameFlatteningJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesCnameFlatteningJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesCnameFlattening] -type zoneSettingListResponseResultZonesCnameFlatteningJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesCnameFlattening) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesCnameFlattening) implementsZoneSettingListResponseResult() { -} - -// How to flatten the cname destination. -type ZoneSettingListResponseResultZonesCnameFlatteningID string - -const ( - ZoneSettingListResponseResultZonesCnameFlatteningIDCnameFlattening ZoneSettingListResponseResultZonesCnameFlatteningID = "cname_flattening" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesCnameFlatteningEditable bool - -const ( - ZoneSettingListResponseResultZonesCnameFlatteningEditableTrue ZoneSettingListResponseResultZonesCnameFlatteningEditable = true - ZoneSettingListResponseResultZonesCnameFlatteningEditableFalse ZoneSettingListResponseResultZonesCnameFlatteningEditable = false -) - -// Value of the cname flattening setting. -type ZoneSettingListResponseResultZonesCnameFlatteningValue string - -const ( - ZoneSettingListResponseResultZonesCnameFlatteningValueFlattenAtRoot ZoneSettingListResponseResultZonesCnameFlatteningValue = "flatten_at_root" - ZoneSettingListResponseResultZonesCnameFlatteningValueFlattenAll ZoneSettingListResponseResultZonesCnameFlatteningValue = "flatten_all" -) - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -type ZoneSettingListResponseResultZonesDevelopmentMode struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesDevelopmentModeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesDevelopmentModeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The interval (in seconds) from when - // development mode expires (positive integer) or last expired (negative integer) - // for the domain. If development mode has never been enabled, this value is false. - TimeRemaining float64 `json:"time_remaining"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesDevelopmentModeValue `json:"value"` - JSON zoneSettingListResponseResultZonesDevelopmentModeJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesDevelopmentModeJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesDevelopmentMode] -type zoneSettingListResponseResultZonesDevelopmentModeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - TimeRemaining apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesDevelopmentMode) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesDevelopmentMode) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesDevelopmentModeID string - -const ( - ZoneSettingListResponseResultZonesDevelopmentModeIDDevelopmentMode ZoneSettingListResponseResultZonesDevelopmentModeID = "development_mode" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesDevelopmentModeEditable bool - -const ( - ZoneSettingListResponseResultZonesDevelopmentModeEditableTrue ZoneSettingListResponseResultZonesDevelopmentModeEditable = true - ZoneSettingListResponseResultZonesDevelopmentModeEditableFalse ZoneSettingListResponseResultZonesDevelopmentModeEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesDevelopmentModeValue string - -const ( - ZoneSettingListResponseResultZonesDevelopmentModeValueOn ZoneSettingListResponseResultZonesDevelopmentModeValue = "on" - ZoneSettingListResponseResultZonesDevelopmentModeValueOff ZoneSettingListResponseResultZonesDevelopmentModeValue = "off" -) - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -type ZoneSettingListResponseResultZonesEarlyHints struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesEarlyHintsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesEarlyHintsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesEarlyHintsValue `json:"value"` - JSON zoneSettingListResponseResultZonesEarlyHintsJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesEarlyHintsJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesEarlyHints] -type zoneSettingListResponseResultZonesEarlyHintsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesEarlyHints) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesEarlyHints) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesEarlyHintsID string - -const ( - ZoneSettingListResponseResultZonesEarlyHintsIDEarlyHints ZoneSettingListResponseResultZonesEarlyHintsID = "early_hints" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesEarlyHintsEditable bool - -const ( - ZoneSettingListResponseResultZonesEarlyHintsEditableTrue ZoneSettingListResponseResultZonesEarlyHintsEditable = true - ZoneSettingListResponseResultZonesEarlyHintsEditableFalse ZoneSettingListResponseResultZonesEarlyHintsEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesEarlyHintsValue string - -const ( - ZoneSettingListResponseResultZonesEarlyHintsValueOn ZoneSettingListResponseResultZonesEarlyHintsValue = "on" - ZoneSettingListResponseResultZonesEarlyHintsValueOff ZoneSettingListResponseResultZonesEarlyHintsValue = "off" -) - -// Time (in seconds) that a resource will be ensured to remain on Cloudflare's -// cache servers. -type ZoneSettingListResponseResultZonesEdgeCacheTTL struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesEdgeCacheTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesEdgeCacheTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The minimum TTL available depends on the plan - // level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) - Value ZoneSettingListResponseResultZonesEdgeCacheTTLValue `json:"value"` - JSON zoneSettingListResponseResultZonesEdgeCacheTTLJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesEdgeCacheTTLJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesEdgeCacheTTL] -type zoneSettingListResponseResultZonesEdgeCacheTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesEdgeCacheTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesEdgeCacheTTL) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesEdgeCacheTTLID string - -const ( - ZoneSettingListResponseResultZonesEdgeCacheTTLIDEdgeCacheTTL ZoneSettingListResponseResultZonesEdgeCacheTTLID = "edge_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesEdgeCacheTTLEditable bool - -const ( - ZoneSettingListResponseResultZonesEdgeCacheTTLEditableTrue ZoneSettingListResponseResultZonesEdgeCacheTTLEditable = true - ZoneSettingListResponseResultZonesEdgeCacheTTLEditableFalse ZoneSettingListResponseResultZonesEdgeCacheTTLEditable = false -) - -// Value of the zone setting. Notes: The minimum TTL available depends on the plan -// level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) -type ZoneSettingListResponseResultZonesEdgeCacheTTLValue float64 - -const ( - ZoneSettingListResponseResultZonesEdgeCacheTTLValue30 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 30 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue60 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 60 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue300 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 300 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue1200 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 1200 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue1800 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 1800 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue3600 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 3600 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue7200 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 7200 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue10800 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 10800 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue14400 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 14400 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue18000 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 18000 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue28800 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 28800 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue43200 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 43200 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue57600 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 57600 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue72000 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 72000 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue86400 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 86400 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue172800 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 172800 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue259200 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 259200 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue345600 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 345600 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue432000 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 432000 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue518400 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 518400 - ZoneSettingListResponseResultZonesEdgeCacheTTLValue604800 ZoneSettingListResponseResultZonesEdgeCacheTTLValue = 604800 -) - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -type ZoneSettingListResponseResultZonesEmailObfuscation struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesEmailObfuscationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesEmailObfuscationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesEmailObfuscationValue `json:"value"` - JSON zoneSettingListResponseResultZonesEmailObfuscationJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesEmailObfuscationJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesEmailObfuscation] -type zoneSettingListResponseResultZonesEmailObfuscationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesEmailObfuscation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesEmailObfuscation) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesEmailObfuscationID string - -const ( - ZoneSettingListResponseResultZonesEmailObfuscationIDEmailObfuscation ZoneSettingListResponseResultZonesEmailObfuscationID = "email_obfuscation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesEmailObfuscationEditable bool - -const ( - ZoneSettingListResponseResultZonesEmailObfuscationEditableTrue ZoneSettingListResponseResultZonesEmailObfuscationEditable = true - ZoneSettingListResponseResultZonesEmailObfuscationEditableFalse ZoneSettingListResponseResultZonesEmailObfuscationEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesEmailObfuscationValue string - -const ( - ZoneSettingListResponseResultZonesEmailObfuscationValueOn ZoneSettingListResponseResultZonesEmailObfuscationValue = "on" - ZoneSettingListResponseResultZonesEmailObfuscationValueOff ZoneSettingListResponseResultZonesEmailObfuscationValue = "off" -) - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingListResponseResultZonesH2Prioritization struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesH2PrioritizationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesH2PrioritizationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesH2PrioritizationValue `json:"value"` - JSON zoneSettingListResponseResultZonesH2PrioritizationJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesH2PrioritizationJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesH2Prioritization] -type zoneSettingListResponseResultZonesH2PrioritizationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesH2Prioritization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesH2Prioritization) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesH2PrioritizationID string - -const ( - ZoneSettingListResponseResultZonesH2PrioritizationIDH2Prioritization ZoneSettingListResponseResultZonesH2PrioritizationID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesH2PrioritizationEditable bool - -const ( - ZoneSettingListResponseResultZonesH2PrioritizationEditableTrue ZoneSettingListResponseResultZonesH2PrioritizationEditable = true - ZoneSettingListResponseResultZonesH2PrioritizationEditableFalse ZoneSettingListResponseResultZonesH2PrioritizationEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesH2PrioritizationValue string - -const ( - ZoneSettingListResponseResultZonesH2PrioritizationValueOn ZoneSettingListResponseResultZonesH2PrioritizationValue = "on" - ZoneSettingListResponseResultZonesH2PrioritizationValueOff ZoneSettingListResponseResultZonesH2PrioritizationValue = "off" - ZoneSettingListResponseResultZonesH2PrioritizationValueCustom ZoneSettingListResponseResultZonesH2PrioritizationValue = "custom" -) - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -type ZoneSettingListResponseResultZonesHotlinkProtection struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesHotlinkProtectionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesHotlinkProtectionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesHotlinkProtectionValue `json:"value"` - JSON zoneSettingListResponseResultZonesHotlinkProtectionJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesHotlinkProtectionJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesHotlinkProtection] -type zoneSettingListResponseResultZonesHotlinkProtectionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesHotlinkProtection) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesHotlinkProtection) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesHotlinkProtectionID string - -const ( - ZoneSettingListResponseResultZonesHotlinkProtectionIDHotlinkProtection ZoneSettingListResponseResultZonesHotlinkProtectionID = "hotlink_protection" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesHotlinkProtectionEditable bool - -const ( - ZoneSettingListResponseResultZonesHotlinkProtectionEditableTrue ZoneSettingListResponseResultZonesHotlinkProtectionEditable = true - ZoneSettingListResponseResultZonesHotlinkProtectionEditableFalse ZoneSettingListResponseResultZonesHotlinkProtectionEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesHotlinkProtectionValue string - -const ( - ZoneSettingListResponseResultZonesHotlinkProtectionValueOn ZoneSettingListResponseResultZonesHotlinkProtectionValue = "on" - ZoneSettingListResponseResultZonesHotlinkProtectionValueOff ZoneSettingListResponseResultZonesHotlinkProtectionValue = "off" -) - -// HTTP2 enabled for this zone. -type ZoneSettingListResponseResultZonesHTTP2 struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesHTTP2ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesHTTP2Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP2 setting. - Value ZoneSettingListResponseResultZonesHTTP2Value `json:"value"` - JSON zoneSettingListResponseResultZonesHTTP2JSON `json:"-"` -} - -// zoneSettingListResponseResultZonesHTTP2JSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesHTTP2] -type zoneSettingListResponseResultZonesHTTP2JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesHTTP2) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesHTTP2) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesHTTP2ID string - -const ( - ZoneSettingListResponseResultZonesHTTP2IDHTTP2 ZoneSettingListResponseResultZonesHTTP2ID = "http2" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesHTTP2Editable bool - -const ( - ZoneSettingListResponseResultZonesHTTP2EditableTrue ZoneSettingListResponseResultZonesHTTP2Editable = true - ZoneSettingListResponseResultZonesHTTP2EditableFalse ZoneSettingListResponseResultZonesHTTP2Editable = false -) - -// Value of the HTTP2 setting. -type ZoneSettingListResponseResultZonesHTTP2Value string - -const ( - ZoneSettingListResponseResultZonesHTTP2ValueOn ZoneSettingListResponseResultZonesHTTP2Value = "on" - ZoneSettingListResponseResultZonesHTTP2ValueOff ZoneSettingListResponseResultZonesHTTP2Value = "off" -) - -// HTTP3 enabled for this zone. -type ZoneSettingListResponseResultZonesHTTP3 struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesHTTP3ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesHTTP3Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP3 setting. - Value ZoneSettingListResponseResultZonesHTTP3Value `json:"value"` - JSON zoneSettingListResponseResultZonesHTTP3JSON `json:"-"` -} - -// zoneSettingListResponseResultZonesHTTP3JSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesHTTP3] -type zoneSettingListResponseResultZonesHTTP3JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesHTTP3) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesHTTP3) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesHTTP3ID string - -const ( - ZoneSettingListResponseResultZonesHTTP3IDHTTP3 ZoneSettingListResponseResultZonesHTTP3ID = "http3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesHTTP3Editable bool - -const ( - ZoneSettingListResponseResultZonesHTTP3EditableTrue ZoneSettingListResponseResultZonesHTTP3Editable = true - ZoneSettingListResponseResultZonesHTTP3EditableFalse ZoneSettingListResponseResultZonesHTTP3Editable = false -) - -// Value of the HTTP3 setting. -type ZoneSettingListResponseResultZonesHTTP3Value string - -const ( - ZoneSettingListResponseResultZonesHTTP3ValueOn ZoneSettingListResponseResultZonesHTTP3Value = "on" - ZoneSettingListResponseResultZonesHTTP3ValueOff ZoneSettingListResponseResultZonesHTTP3Value = "off" -) - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingListResponseResultZonesImageResizing struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesImageResizingID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesImageResizingEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value ZoneSettingListResponseResultZonesImageResizingValue `json:"value"` - JSON zoneSettingListResponseResultZonesImageResizingJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesImageResizingJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesImageResizing] -type zoneSettingListResponseResultZonesImageResizingJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesImageResizing) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesImageResizing) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesImageResizingID string - -const ( - ZoneSettingListResponseResultZonesImageResizingIDImageResizing ZoneSettingListResponseResultZonesImageResizingID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesImageResizingEditable bool - -const ( - ZoneSettingListResponseResultZonesImageResizingEditableTrue ZoneSettingListResponseResultZonesImageResizingEditable = true - ZoneSettingListResponseResultZonesImageResizingEditableFalse ZoneSettingListResponseResultZonesImageResizingEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingListResponseResultZonesImageResizingValue string - -const ( - ZoneSettingListResponseResultZonesImageResizingValueOn ZoneSettingListResponseResultZonesImageResizingValue = "on" - ZoneSettingListResponseResultZonesImageResizingValueOff ZoneSettingListResponseResultZonesImageResizingValue = "off" - ZoneSettingListResponseResultZonesImageResizingValueOpen ZoneSettingListResponseResultZonesImageResizingValue = "open" -) - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -type ZoneSettingListResponseResultZonesIPGeolocation struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesIPGeolocationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesIPGeolocationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesIPGeolocationValue `json:"value"` - JSON zoneSettingListResponseResultZonesIPGeolocationJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesIPGeolocationJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesIPGeolocation] -type zoneSettingListResponseResultZonesIPGeolocationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesIPGeolocation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesIPGeolocation) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesIPGeolocationID string - -const ( - ZoneSettingListResponseResultZonesIPGeolocationIDIPGeolocation ZoneSettingListResponseResultZonesIPGeolocationID = "ip_geolocation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesIPGeolocationEditable bool - -const ( - ZoneSettingListResponseResultZonesIPGeolocationEditableTrue ZoneSettingListResponseResultZonesIPGeolocationEditable = true - ZoneSettingListResponseResultZonesIPGeolocationEditableFalse ZoneSettingListResponseResultZonesIPGeolocationEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesIPGeolocationValue string - -const ( - ZoneSettingListResponseResultZonesIPGeolocationValueOn ZoneSettingListResponseResultZonesIPGeolocationValue = "on" - ZoneSettingListResponseResultZonesIPGeolocationValueOff ZoneSettingListResponseResultZonesIPGeolocationValue = "off" -) - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -type ZoneSettingListResponseResultZonesIPV6 struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesIPV6ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesIPV6Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesIPV6Value `json:"value"` - JSON zoneSettingListResponseResultZonesIPV6JSON `json:"-"` -} - -// zoneSettingListResponseResultZonesIPV6JSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesIPV6] -type zoneSettingListResponseResultZonesIPV6JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesIPV6) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesIPV6) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesIPV6ID string - -const ( - ZoneSettingListResponseResultZonesIPV6IDIPV6 ZoneSettingListResponseResultZonesIPV6ID = "ipv6" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesIPV6Editable bool - -const ( - ZoneSettingListResponseResultZonesIPV6EditableTrue ZoneSettingListResponseResultZonesIPV6Editable = true - ZoneSettingListResponseResultZonesIPV6EditableFalse ZoneSettingListResponseResultZonesIPV6Editable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesIPV6Value string - -const ( - ZoneSettingListResponseResultZonesIPV6ValueOff ZoneSettingListResponseResultZonesIPV6Value = "off" - ZoneSettingListResponseResultZonesIPV6ValueOn ZoneSettingListResponseResultZonesIPV6Value = "on" -) - -// Maximum size of an allowable upload. -type ZoneSettingListResponseResultZonesMaxUpload struct { - // identifier of the zone setting. - ID ZoneSettingListResponseResultZonesMaxUploadID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesMaxUploadEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The size depends on the plan level of the - // zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) - Value ZoneSettingListResponseResultZonesMaxUploadValue `json:"value"` - JSON zoneSettingListResponseResultZonesMaxUploadJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMaxUploadJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesMaxUpload] -type zoneSettingListResponseResultZonesMaxUploadJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMaxUpload) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesMaxUpload) implementsZoneSettingListResponseResult() {} - -// identifier of the zone setting. -type ZoneSettingListResponseResultZonesMaxUploadID string - -const ( - ZoneSettingListResponseResultZonesMaxUploadIDMaxUpload ZoneSettingListResponseResultZonesMaxUploadID = "max_upload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesMaxUploadEditable bool - -const ( - ZoneSettingListResponseResultZonesMaxUploadEditableTrue ZoneSettingListResponseResultZonesMaxUploadEditable = true - ZoneSettingListResponseResultZonesMaxUploadEditableFalse ZoneSettingListResponseResultZonesMaxUploadEditable = false -) - -// Value of the zone setting. Notes: The size depends on the plan level of the -// zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) -type ZoneSettingListResponseResultZonesMaxUploadValue float64 - -const ( - ZoneSettingListResponseResultZonesMaxUploadValue100 ZoneSettingListResponseResultZonesMaxUploadValue = 100 - ZoneSettingListResponseResultZonesMaxUploadValue200 ZoneSettingListResponseResultZonesMaxUploadValue = 200 - ZoneSettingListResponseResultZonesMaxUploadValue500 ZoneSettingListResponseResultZonesMaxUploadValue = 500 -) - -// Only accepts HTTPS requests that use at least the TLS protocol version -// specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be -// rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. -type ZoneSettingListResponseResultZonesMinTLSVersion struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesMinTLSVersionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesMinTLSVersionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesMinTLSVersionValue `json:"value"` - JSON zoneSettingListResponseResultZonesMinTLSVersionJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMinTLSVersionJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesMinTLSVersion] -type zoneSettingListResponseResultZonesMinTLSVersionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMinTLSVersion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesMinTLSVersion) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesMinTLSVersionID string - -const ( - ZoneSettingListResponseResultZonesMinTLSVersionIDMinTLSVersion ZoneSettingListResponseResultZonesMinTLSVersionID = "min_tls_version" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesMinTLSVersionEditable bool - -const ( - ZoneSettingListResponseResultZonesMinTLSVersionEditableTrue ZoneSettingListResponseResultZonesMinTLSVersionEditable = true - ZoneSettingListResponseResultZonesMinTLSVersionEditableFalse ZoneSettingListResponseResultZonesMinTLSVersionEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesMinTLSVersionValue string - -const ( - ZoneSettingListResponseResultZonesMinTLSVersionValue1_0 ZoneSettingListResponseResultZonesMinTLSVersionValue = "1.0" - ZoneSettingListResponseResultZonesMinTLSVersionValue1_1 ZoneSettingListResponseResultZonesMinTLSVersionValue = "1.1" - ZoneSettingListResponseResultZonesMinTLSVersionValue1_2 ZoneSettingListResponseResultZonesMinTLSVersionValue = "1.2" - ZoneSettingListResponseResultZonesMinTLSVersionValue1_3 ZoneSettingListResponseResultZonesMinTLSVersionValue = "1.3" -) - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -type ZoneSettingListResponseResultZonesMinify struct { - // Zone setting identifier. - ID ZoneSettingListResponseResultZonesMinifyID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesMinifyEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesMinifyValue `json:"value"` - JSON zoneSettingListResponseResultZonesMinifyJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMinifyJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesMinify] -type zoneSettingListResponseResultZonesMinifyJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMinify) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesMinify) implementsZoneSettingListResponseResult() {} - -// Zone setting identifier. -type ZoneSettingListResponseResultZonesMinifyID string - -const ( - ZoneSettingListResponseResultZonesMinifyIDMinify ZoneSettingListResponseResultZonesMinifyID = "minify" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesMinifyEditable bool - -const ( - ZoneSettingListResponseResultZonesMinifyEditableTrue ZoneSettingListResponseResultZonesMinifyEditable = true - ZoneSettingListResponseResultZonesMinifyEditableFalse ZoneSettingListResponseResultZonesMinifyEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesMinifyValue struct { - // Automatically minify all CSS files for your website. - Css ZoneSettingListResponseResultZonesMinifyValueCss `json:"css"` - // Automatically minify all HTML files for your website. - HTML ZoneSettingListResponseResultZonesMinifyValueHTML `json:"html"` - // Automatically minify all JavaScript files for your website. - Js ZoneSettingListResponseResultZonesMinifyValueJs `json:"js"` - JSON zoneSettingListResponseResultZonesMinifyValueJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMinifyValueJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesMinifyValue] -type zoneSettingListResponseResultZonesMinifyValueJSON struct { - Css apijson.Field - HTML apijson.Field - Js apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMinifyValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingListResponseResultZonesMinifyValueCss string - -const ( - ZoneSettingListResponseResultZonesMinifyValueCssOn ZoneSettingListResponseResultZonesMinifyValueCss = "on" - ZoneSettingListResponseResultZonesMinifyValueCssOff ZoneSettingListResponseResultZonesMinifyValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingListResponseResultZonesMinifyValueHTML string - -const ( - ZoneSettingListResponseResultZonesMinifyValueHTMLOn ZoneSettingListResponseResultZonesMinifyValueHTML = "on" - ZoneSettingListResponseResultZonesMinifyValueHTMLOff ZoneSettingListResponseResultZonesMinifyValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingListResponseResultZonesMinifyValueJs string - -const ( - ZoneSettingListResponseResultZonesMinifyValueJsOn ZoneSettingListResponseResultZonesMinifyValueJs = "on" - ZoneSettingListResponseResultZonesMinifyValueJsOff ZoneSettingListResponseResultZonesMinifyValueJs = "off" -) - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to -// [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for -// more information. -type ZoneSettingListResponseResultZonesMirage struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesMirageID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesMirageEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesMirageValue `json:"value"` - JSON zoneSettingListResponseResultZonesMirageJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMirageJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesMirage] -type zoneSettingListResponseResultZonesMirageJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMirage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesMirage) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesMirageID string - -const ( - ZoneSettingListResponseResultZonesMirageIDMirage ZoneSettingListResponseResultZonesMirageID = "mirage" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesMirageEditable bool - -const ( - ZoneSettingListResponseResultZonesMirageEditableTrue ZoneSettingListResponseResultZonesMirageEditable = true - ZoneSettingListResponseResultZonesMirageEditableFalse ZoneSettingListResponseResultZonesMirageEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesMirageValue string - -const ( - ZoneSettingListResponseResultZonesMirageValueOn ZoneSettingListResponseResultZonesMirageValue = "on" - ZoneSettingListResponseResultZonesMirageValueOff ZoneSettingListResponseResultZonesMirageValue = "off" -) - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -type ZoneSettingListResponseResultZonesMobileRedirect struct { - // Identifier of the zone setting. - ID ZoneSettingListResponseResultZonesMobileRedirectID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesMobileRedirectEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesMobileRedirectValue `json:"value"` - JSON zoneSettingListResponseResultZonesMobileRedirectJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMobileRedirectJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesMobileRedirect] -type zoneSettingListResponseResultZonesMobileRedirectJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMobileRedirect) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesMobileRedirect) implementsZoneSettingListResponseResult() {} - -// Identifier of the zone setting. -type ZoneSettingListResponseResultZonesMobileRedirectID string - -const ( - ZoneSettingListResponseResultZonesMobileRedirectIDMobileRedirect ZoneSettingListResponseResultZonesMobileRedirectID = "mobile_redirect" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesMobileRedirectEditable bool - -const ( - ZoneSettingListResponseResultZonesMobileRedirectEditableTrue ZoneSettingListResponseResultZonesMobileRedirectEditable = true - ZoneSettingListResponseResultZonesMobileRedirectEditableFalse ZoneSettingListResponseResultZonesMobileRedirectEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesMobileRedirectValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain string `json:"mobile_subdomain,nullable"` - // Whether or not mobile redirect is enabled. - Status ZoneSettingListResponseResultZonesMobileRedirectValueStatus `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri bool `json:"strip_uri"` - JSON zoneSettingListResponseResultZonesMobileRedirectValueJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesMobileRedirectValueJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesMobileRedirectValue] -type zoneSettingListResponseResultZonesMobileRedirectValueJSON struct { - MobileSubdomain apijson.Field - Status apijson.Field - StripUri apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesMobileRedirectValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingListResponseResultZonesMobileRedirectValueStatus string - -const ( - ZoneSettingListResponseResultZonesMobileRedirectValueStatusOn ZoneSettingListResponseResultZonesMobileRedirectValueStatus = "on" - ZoneSettingListResponseResultZonesMobileRedirectValueStatusOff ZoneSettingListResponseResultZonesMobileRedirectValueStatus = "off" -) - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingListResponseResultZonesNEL struct { - // Zone setting identifier. - ID ZoneSettingListResponseResultZonesNELID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesNELEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesNELValue `json:"value"` - JSON zoneSettingListResponseResultZonesNELJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesNELJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesNEL] -type zoneSettingListResponseResultZonesNELJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesNEL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesNEL) implementsZoneSettingListResponseResult() {} - -// Zone setting identifier. -type ZoneSettingListResponseResultZonesNELID string - -const ( - ZoneSettingListResponseResultZonesNELIDNEL ZoneSettingListResponseResultZonesNELID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesNELEditable bool - -const ( - ZoneSettingListResponseResultZonesNELEditableTrue ZoneSettingListResponseResultZonesNELEditable = true - ZoneSettingListResponseResultZonesNELEditableFalse ZoneSettingListResponseResultZonesNELEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesNELValue struct { - Enabled bool `json:"enabled"` - JSON zoneSettingListResponseResultZonesNELValueJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesNELValueJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesNELValue] -type zoneSettingListResponseResultZonesNELValueJSON struct { - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesNELValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables the Opportunistic Encryption feature for a zone. -type ZoneSettingListResponseResultZonesOpportunisticEncryption struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesOpportunisticEncryptionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesOpportunisticEncryptionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingListResponseResultZonesOpportunisticEncryptionValue `json:"value"` - JSON zoneSettingListResponseResultZonesOpportunisticEncryptionJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesOpportunisticEncryptionJSON contains the JSON -// metadata for the struct -// [ZoneSettingListResponseResultZonesOpportunisticEncryption] -type zoneSettingListResponseResultZonesOpportunisticEncryptionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesOpportunisticEncryption) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesOpportunisticEncryption) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesOpportunisticEncryptionID string - -const ( - ZoneSettingListResponseResultZonesOpportunisticEncryptionIDOpportunisticEncryption ZoneSettingListResponseResultZonesOpportunisticEncryptionID = "opportunistic_encryption" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesOpportunisticEncryptionEditable bool - -const ( - ZoneSettingListResponseResultZonesOpportunisticEncryptionEditableTrue ZoneSettingListResponseResultZonesOpportunisticEncryptionEditable = true - ZoneSettingListResponseResultZonesOpportunisticEncryptionEditableFalse ZoneSettingListResponseResultZonesOpportunisticEncryptionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingListResponseResultZonesOpportunisticEncryptionValue string - -const ( - ZoneSettingListResponseResultZonesOpportunisticEncryptionValueOn ZoneSettingListResponseResultZonesOpportunisticEncryptionValue = "on" - ZoneSettingListResponseResultZonesOpportunisticEncryptionValueOff ZoneSettingListResponseResultZonesOpportunisticEncryptionValue = "off" -) - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -type ZoneSettingListResponseResultZonesOpportunisticOnion struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesOpportunisticOnionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesOpportunisticOnionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingListResponseResultZonesOpportunisticOnionValue `json:"value"` - JSON zoneSettingListResponseResultZonesOpportunisticOnionJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesOpportunisticOnionJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesOpportunisticOnion] -type zoneSettingListResponseResultZonesOpportunisticOnionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesOpportunisticOnion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesOpportunisticOnion) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesOpportunisticOnionID string - -const ( - ZoneSettingListResponseResultZonesOpportunisticOnionIDOpportunisticOnion ZoneSettingListResponseResultZonesOpportunisticOnionID = "opportunistic_onion" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesOpportunisticOnionEditable bool - -const ( - ZoneSettingListResponseResultZonesOpportunisticOnionEditableTrue ZoneSettingListResponseResultZonesOpportunisticOnionEditable = true - ZoneSettingListResponseResultZonesOpportunisticOnionEditableFalse ZoneSettingListResponseResultZonesOpportunisticOnionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingListResponseResultZonesOpportunisticOnionValue string - -const ( - ZoneSettingListResponseResultZonesOpportunisticOnionValueOn ZoneSettingListResponseResultZonesOpportunisticOnionValue = "on" - ZoneSettingListResponseResultZonesOpportunisticOnionValueOff ZoneSettingListResponseResultZonesOpportunisticOnionValue = "off" -) - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingListResponseResultZonesOrangeToOrange struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesOrangeToOrangeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesOrangeToOrangeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesOrangeToOrangeValue `json:"value"` - JSON zoneSettingListResponseResultZonesOrangeToOrangeJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesOrangeToOrangeJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesOrangeToOrange] -type zoneSettingListResponseResultZonesOrangeToOrangeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesOrangeToOrange) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesOrangeToOrange) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesOrangeToOrangeID string - -const ( - ZoneSettingListResponseResultZonesOrangeToOrangeIDOrangeToOrange ZoneSettingListResponseResultZonesOrangeToOrangeID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesOrangeToOrangeEditable bool - -const ( - ZoneSettingListResponseResultZonesOrangeToOrangeEditableTrue ZoneSettingListResponseResultZonesOrangeToOrangeEditable = true - ZoneSettingListResponseResultZonesOrangeToOrangeEditableFalse ZoneSettingListResponseResultZonesOrangeToOrangeEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesOrangeToOrangeValue string - -const ( - ZoneSettingListResponseResultZonesOrangeToOrangeValueOn ZoneSettingListResponseResultZonesOrangeToOrangeValue = "on" - ZoneSettingListResponseResultZonesOrangeToOrangeValueOff ZoneSettingListResponseResultZonesOrangeToOrangeValue = "off" -) - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -type ZoneSettingListResponseResultZonesOriginErrorPagePassThru struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesOriginErrorPagePassThruID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesOriginErrorPagePassThruValue `json:"value"` - JSON zoneSettingListResponseResultZonesOriginErrorPagePassThruJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesOriginErrorPagePassThruJSON contains the JSON -// metadata for the struct -// [ZoneSettingListResponseResultZonesOriginErrorPagePassThru] -type zoneSettingListResponseResultZonesOriginErrorPagePassThruJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesOriginErrorPagePassThru) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesOriginErrorPagePassThru) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesOriginErrorPagePassThruID string - -const ( - ZoneSettingListResponseResultZonesOriginErrorPagePassThruIDOriginErrorPagePassThru ZoneSettingListResponseResultZonesOriginErrorPagePassThruID = "origin_error_page_pass_thru" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditable bool - -const ( - ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditableTrue ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditable = true - ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditableFalse ZoneSettingListResponseResultZonesOriginErrorPagePassThruEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesOriginErrorPagePassThruValue string - -const ( - ZoneSettingListResponseResultZonesOriginErrorPagePassThruValueOn ZoneSettingListResponseResultZonesOriginErrorPagePassThruValue = "on" - ZoneSettingListResponseResultZonesOriginErrorPagePassThruValueOff ZoneSettingListResponseResultZonesOriginErrorPagePassThruValue = "off" -) - -type ZoneSettingListResponseResultZonesOriginMaxHTTPVersion struct { - // Identifier of the zone setting. - ID ZoneSettingListResponseResultZonesOriginMaxHTTPVersionID `json:"id,required"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - JSON zoneSettingListResponseResultZonesOriginMaxHTTPVersionJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesOriginMaxHTTPVersionJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesOriginMaxHTTPVersion] -type zoneSettingListResponseResultZonesOriginMaxHTTPVersionJSON struct { - ID apijson.Field - ModifiedOn apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesOriginMaxHTTPVersion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesOriginMaxHTTPVersion) implementsZoneSettingListResponseResult() { -} - -// Identifier of the zone setting. -type ZoneSettingListResponseResultZonesOriginMaxHTTPVersionID string - -const ( - ZoneSettingListResponseResultZonesOriginMaxHTTPVersionIDOriginMaxHTTPVersion ZoneSettingListResponseResultZonesOriginMaxHTTPVersionID = "origin_max_http_version" -) - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingListResponseResultZonesPolish struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesPolishID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesPolishEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesPolishValue `json:"value"` - JSON zoneSettingListResponseResultZonesPolishJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesPolishJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesPolish] -type zoneSettingListResponseResultZonesPolishJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesPolish) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesPolish) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesPolishID string - -const ( - ZoneSettingListResponseResultZonesPolishIDPolish ZoneSettingListResponseResultZonesPolishID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesPolishEditable bool - -const ( - ZoneSettingListResponseResultZonesPolishEditableTrue ZoneSettingListResponseResultZonesPolishEditable = true - ZoneSettingListResponseResultZonesPolishEditableFalse ZoneSettingListResponseResultZonesPolishEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesPolishValue string - -const ( - ZoneSettingListResponseResultZonesPolishValueOff ZoneSettingListResponseResultZonesPolishValue = "off" - ZoneSettingListResponseResultZonesPolishValueLossless ZoneSettingListResponseResultZonesPolishValue = "lossless" - ZoneSettingListResponseResultZonesPolishValueLossy ZoneSettingListResponseResultZonesPolishValue = "lossy" -) - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -type ZoneSettingListResponseResultZonesPrefetchPreload struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesPrefetchPreloadID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesPrefetchPreloadEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesPrefetchPreloadValue `json:"value"` - JSON zoneSettingListResponseResultZonesPrefetchPreloadJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesPrefetchPreloadJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesPrefetchPreload] -type zoneSettingListResponseResultZonesPrefetchPreloadJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesPrefetchPreload) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesPrefetchPreload) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesPrefetchPreloadID string - -const ( - ZoneSettingListResponseResultZonesPrefetchPreloadIDPrefetchPreload ZoneSettingListResponseResultZonesPrefetchPreloadID = "prefetch_preload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesPrefetchPreloadEditable bool - -const ( - ZoneSettingListResponseResultZonesPrefetchPreloadEditableTrue ZoneSettingListResponseResultZonesPrefetchPreloadEditable = true - ZoneSettingListResponseResultZonesPrefetchPreloadEditableFalse ZoneSettingListResponseResultZonesPrefetchPreloadEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesPrefetchPreloadValue string - -const ( - ZoneSettingListResponseResultZonesPrefetchPreloadValueOn ZoneSettingListResponseResultZonesPrefetchPreloadValue = "on" - ZoneSettingListResponseResultZonesPrefetchPreloadValueOff ZoneSettingListResponseResultZonesPrefetchPreloadValue = "off" -) - -// Maximum time between two read operations from origin. -type ZoneSettingListResponseResultZonesProxyReadTimeout struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesProxyReadTimeoutID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesProxyReadTimeoutEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value float64 `json:"value"` - JSON zoneSettingListResponseResultZonesProxyReadTimeoutJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesProxyReadTimeoutJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesProxyReadTimeout] -type zoneSettingListResponseResultZonesProxyReadTimeoutJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesProxyReadTimeout) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesProxyReadTimeout) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesProxyReadTimeoutID string - -const ( - ZoneSettingListResponseResultZonesProxyReadTimeoutIDProxyReadTimeout ZoneSettingListResponseResultZonesProxyReadTimeoutID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesProxyReadTimeoutEditable bool - -const ( - ZoneSettingListResponseResultZonesProxyReadTimeoutEditableTrue ZoneSettingListResponseResultZonesProxyReadTimeoutEditable = true - ZoneSettingListResponseResultZonesProxyReadTimeoutEditableFalse ZoneSettingListResponseResultZonesProxyReadTimeoutEditable = false -) - -// The value set for the Pseudo IPv4 setting. -type ZoneSettingListResponseResultZonesPseudoIpv4 struct { - // Value of the Pseudo IPv4 setting. - ID ZoneSettingListResponseResultZonesPseudoIpv4ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesPseudoIpv4Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the Pseudo IPv4 setting. - Value ZoneSettingListResponseResultZonesPseudoIpv4Value `json:"value"` - JSON zoneSettingListResponseResultZonesPseudoIpv4JSON `json:"-"` -} - -// zoneSettingListResponseResultZonesPseudoIpv4JSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesPseudoIpv4] -type zoneSettingListResponseResultZonesPseudoIpv4JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesPseudoIpv4) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesPseudoIpv4) implementsZoneSettingListResponseResult() {} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingListResponseResultZonesPseudoIpv4ID string - -const ( - ZoneSettingListResponseResultZonesPseudoIpv4IDPseudoIpv4 ZoneSettingListResponseResultZonesPseudoIpv4ID = "pseudo_ipv4" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesPseudoIpv4Editable bool - -const ( - ZoneSettingListResponseResultZonesPseudoIpv4EditableTrue ZoneSettingListResponseResultZonesPseudoIpv4Editable = true - ZoneSettingListResponseResultZonesPseudoIpv4EditableFalse ZoneSettingListResponseResultZonesPseudoIpv4Editable = false -) - -// Value of the Pseudo IPv4 setting. -type ZoneSettingListResponseResultZonesPseudoIpv4Value string - -const ( - ZoneSettingListResponseResultZonesPseudoIpv4ValueOff ZoneSettingListResponseResultZonesPseudoIpv4Value = "off" - ZoneSettingListResponseResultZonesPseudoIpv4ValueAddHeader ZoneSettingListResponseResultZonesPseudoIpv4Value = "add_header" - ZoneSettingListResponseResultZonesPseudoIpv4ValueOverwriteHeader ZoneSettingListResponseResultZonesPseudoIpv4Value = "overwrite_header" -) - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -type ZoneSettingListResponseResultZonesResponseBuffering struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesResponseBufferingID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesResponseBufferingEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesResponseBufferingValue `json:"value"` - JSON zoneSettingListResponseResultZonesResponseBufferingJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesResponseBufferingJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesResponseBuffering] -type zoneSettingListResponseResultZonesResponseBufferingJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesResponseBuffering) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesResponseBuffering) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesResponseBufferingID string - -const ( - ZoneSettingListResponseResultZonesResponseBufferingIDResponseBuffering ZoneSettingListResponseResultZonesResponseBufferingID = "response_buffering" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesResponseBufferingEditable bool - -const ( - ZoneSettingListResponseResultZonesResponseBufferingEditableTrue ZoneSettingListResponseResultZonesResponseBufferingEditable = true - ZoneSettingListResponseResultZonesResponseBufferingEditableFalse ZoneSettingListResponseResultZonesResponseBufferingEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesResponseBufferingValue string - -const ( - ZoneSettingListResponseResultZonesResponseBufferingValueOn ZoneSettingListResponseResultZonesResponseBufferingValue = "on" - ZoneSettingListResponseResultZonesResponseBufferingValueOff ZoneSettingListResponseResultZonesResponseBufferingValue = "off" -) - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingListResponseResultZonesRocketLoader struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesRocketLoaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesRocketLoaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesRocketLoaderValue `json:"value"` - JSON zoneSettingListResponseResultZonesRocketLoaderJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesRocketLoaderJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesRocketLoader] -type zoneSettingListResponseResultZonesRocketLoaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesRocketLoader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesRocketLoader) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesRocketLoaderID string - -const ( - ZoneSettingListResponseResultZonesRocketLoaderIDRocketLoader ZoneSettingListResponseResultZonesRocketLoaderID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesRocketLoaderEditable bool - -const ( - ZoneSettingListResponseResultZonesRocketLoaderEditableTrue ZoneSettingListResponseResultZonesRocketLoaderEditable = true - ZoneSettingListResponseResultZonesRocketLoaderEditableFalse ZoneSettingListResponseResultZonesRocketLoaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesRocketLoaderValue string - -const ( - ZoneSettingListResponseResultZonesRocketLoaderValueOn ZoneSettingListResponseResultZonesRocketLoaderValue = "on" - ZoneSettingListResponseResultZonesRocketLoaderValueOff ZoneSettingListResponseResultZonesRocketLoaderValue = "off" -) - -// [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) -// serves your WordPress site from Cloudflare's edge network and caches third-party -// fonts. -type ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimization struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValue `json:"value"` - JSON zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationJSON -// contains the JSON metadata for the struct -// [ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimization] -type zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimization) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationID string - -const ( - ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationIDAutomaticPlatformOptimization ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationID = "automatic_platform_optimization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditable bool - -const ( - ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditableTrue ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditable = true - ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditableFalse ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationEditable = false -) - -type ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValue struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType bool `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf bool `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled bool `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames []string `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress bool `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin bool `json:"wp_plugin,required"` - JSON zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON -// contains the JSON metadata for the struct -// [ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValue] -type zoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON struct { - CacheByDeviceType apijson.Field - Cf apijson.Field - Enabled apijson.Field - Hostnames apijson.Field - Wordpress apijson.Field - WpPlugin apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSchemasAutomaticPlatformOptimizationValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare security header for a zone. -type ZoneSettingListResponseResultZonesSecurityHeader struct { - // ID of the zone's security header. - ID ZoneSettingListResponseResultZonesSecurityHeaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSecurityHeaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingListResponseResultZonesSecurityHeaderValue `json:"value"` - JSON zoneSettingListResponseResultZonesSecurityHeaderJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSecurityHeaderJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesSecurityHeader] -type zoneSettingListResponseResultZonesSecurityHeaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSecurityHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSecurityHeader) implementsZoneSettingListResponseResult() {} - -// ID of the zone's security header. -type ZoneSettingListResponseResultZonesSecurityHeaderID string - -const ( - ZoneSettingListResponseResultZonesSecurityHeaderIDSecurityHeader ZoneSettingListResponseResultZonesSecurityHeaderID = "security_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSecurityHeaderEditable bool - -const ( - ZoneSettingListResponseResultZonesSecurityHeaderEditableTrue ZoneSettingListResponseResultZonesSecurityHeaderEditable = true - ZoneSettingListResponseResultZonesSecurityHeaderEditableFalse ZoneSettingListResponseResultZonesSecurityHeaderEditable = false -) - -type ZoneSettingListResponseResultZonesSecurityHeaderValue struct { - // Strict Transport Security. - StrictTransportSecurity ZoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurity `json:"strict_transport_security"` - JSON zoneSettingListResponseResultZonesSecurityHeaderValueJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSecurityHeaderValueJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesSecurityHeaderValue] -type zoneSettingListResponseResultZonesSecurityHeaderValueJSON struct { - StrictTransportSecurity apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSecurityHeaderValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Strict Transport Security. -type ZoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled bool `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains bool `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge float64 `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff bool `json:"nosniff"` - JSON zoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON -// contains the JSON metadata for the struct -// [ZoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurity] -type zoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON struct { - Enabled apijson.Field - IncludeSubdomains apijson.Field - MaxAge apijson.Field - Nosniff apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSecurityHeaderValueStrictTransportSecurity) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -type ZoneSettingListResponseResultZonesSecurityLevel struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesSecurityLevelID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSecurityLevelEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesSecurityLevelValue `json:"value"` - JSON zoneSettingListResponseResultZonesSecurityLevelJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSecurityLevelJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesSecurityLevel] -type zoneSettingListResponseResultZonesSecurityLevelJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSecurityLevel) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSecurityLevel) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesSecurityLevelID string - -const ( - ZoneSettingListResponseResultZonesSecurityLevelIDSecurityLevel ZoneSettingListResponseResultZonesSecurityLevelID = "security_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSecurityLevelEditable bool - -const ( - ZoneSettingListResponseResultZonesSecurityLevelEditableTrue ZoneSettingListResponseResultZonesSecurityLevelEditable = true - ZoneSettingListResponseResultZonesSecurityLevelEditableFalse ZoneSettingListResponseResultZonesSecurityLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesSecurityLevelValue string - -const ( - ZoneSettingListResponseResultZonesSecurityLevelValueOff ZoneSettingListResponseResultZonesSecurityLevelValue = "off" - ZoneSettingListResponseResultZonesSecurityLevelValueEssentiallyOff ZoneSettingListResponseResultZonesSecurityLevelValue = "essentially_off" - ZoneSettingListResponseResultZonesSecurityLevelValueLow ZoneSettingListResponseResultZonesSecurityLevelValue = "low" - ZoneSettingListResponseResultZonesSecurityLevelValueMedium ZoneSettingListResponseResultZonesSecurityLevelValue = "medium" - ZoneSettingListResponseResultZonesSecurityLevelValueHigh ZoneSettingListResponseResultZonesSecurityLevelValue = "high" - ZoneSettingListResponseResultZonesSecurityLevelValueUnderAttack ZoneSettingListResponseResultZonesSecurityLevelValue = "under_attack" -) - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -type ZoneSettingListResponseResultZonesServerSideExclude struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesServerSideExcludeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesServerSideExcludeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesServerSideExcludeValue `json:"value"` - JSON zoneSettingListResponseResultZonesServerSideExcludeJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesServerSideExcludeJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesServerSideExclude] -type zoneSettingListResponseResultZonesServerSideExcludeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesServerSideExclude) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesServerSideExclude) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesServerSideExcludeID string - -const ( - ZoneSettingListResponseResultZonesServerSideExcludeIDServerSideExclude ZoneSettingListResponseResultZonesServerSideExcludeID = "server_side_exclude" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesServerSideExcludeEditable bool - -const ( - ZoneSettingListResponseResultZonesServerSideExcludeEditableTrue ZoneSettingListResponseResultZonesServerSideExcludeEditable = true - ZoneSettingListResponseResultZonesServerSideExcludeEditableFalse ZoneSettingListResponseResultZonesServerSideExcludeEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesServerSideExcludeValue string - -const ( - ZoneSettingListResponseResultZonesServerSideExcludeValueOn ZoneSettingListResponseResultZonesServerSideExcludeValue = "on" - ZoneSettingListResponseResultZonesServerSideExcludeValueOff ZoneSettingListResponseResultZonesServerSideExcludeValue = "off" -) - -// Allow SHA1 support. -type ZoneSettingListResponseResultZonesSha1Support struct { - // Zone setting identifier. - ID ZoneSettingListResponseResultZonesSha1SupportID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSha1SupportEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesSha1SupportValue `json:"value"` - JSON zoneSettingListResponseResultZonesSha1SupportJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSha1SupportJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesSha1Support] -type zoneSettingListResponseResultZonesSha1SupportJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSha1Support) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSha1Support) implementsZoneSettingListResponseResult() {} - -// Zone setting identifier. -type ZoneSettingListResponseResultZonesSha1SupportID string - -const ( - ZoneSettingListResponseResultZonesSha1SupportIDSha1Support ZoneSettingListResponseResultZonesSha1SupportID = "sha1_support" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSha1SupportEditable bool - -const ( - ZoneSettingListResponseResultZonesSha1SupportEditableTrue ZoneSettingListResponseResultZonesSha1SupportEditable = true - ZoneSettingListResponseResultZonesSha1SupportEditableFalse ZoneSettingListResponseResultZonesSha1SupportEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesSha1SupportValue string - -const ( - ZoneSettingListResponseResultZonesSha1SupportValueOff ZoneSettingListResponseResultZonesSha1SupportValue = "off" - ZoneSettingListResponseResultZonesSha1SupportValueOn ZoneSettingListResponseResultZonesSha1SupportValue = "on" -) - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -type ZoneSettingListResponseResultZonesSortQueryStringForCache struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesSortQueryStringForCacheID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSortQueryStringForCacheEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesSortQueryStringForCacheValue `json:"value"` - JSON zoneSettingListResponseResultZonesSortQueryStringForCacheJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSortQueryStringForCacheJSON contains the JSON -// metadata for the struct -// [ZoneSettingListResponseResultZonesSortQueryStringForCache] -type zoneSettingListResponseResultZonesSortQueryStringForCacheJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSortQueryStringForCache) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSortQueryStringForCache) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesSortQueryStringForCacheID string - -const ( - ZoneSettingListResponseResultZonesSortQueryStringForCacheIDSortQueryStringForCache ZoneSettingListResponseResultZonesSortQueryStringForCacheID = "sort_query_string_for_cache" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSortQueryStringForCacheEditable bool - -const ( - ZoneSettingListResponseResultZonesSortQueryStringForCacheEditableTrue ZoneSettingListResponseResultZonesSortQueryStringForCacheEditable = true - ZoneSettingListResponseResultZonesSortQueryStringForCacheEditableFalse ZoneSettingListResponseResultZonesSortQueryStringForCacheEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesSortQueryStringForCacheValue string - -const ( - ZoneSettingListResponseResultZonesSortQueryStringForCacheValueOn ZoneSettingListResponseResultZonesSortQueryStringForCacheValue = "on" - ZoneSettingListResponseResultZonesSortQueryStringForCacheValueOff ZoneSettingListResponseResultZonesSortQueryStringForCacheValue = "off" -) - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -type ZoneSettingListResponseResultZonesSSL struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesSSLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesSSLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Depends on the zone's plan level - Value ZoneSettingListResponseResultZonesSSLValue `json:"value"` - JSON zoneSettingListResponseResultZonesSSLJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSSLJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesSSL] -type zoneSettingListResponseResultZonesSSLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSSL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSSL) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesSSLID string - -const ( - ZoneSettingListResponseResultZonesSSLIDSSL ZoneSettingListResponseResultZonesSSLID = "ssl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesSSLEditable bool - -const ( - ZoneSettingListResponseResultZonesSSLEditableTrue ZoneSettingListResponseResultZonesSSLEditable = true - ZoneSettingListResponseResultZonesSSLEditableFalse ZoneSettingListResponseResultZonesSSLEditable = false -) - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingListResponseResultZonesSSLValue string - -const ( - ZoneSettingListResponseResultZonesSSLValueOff ZoneSettingListResponseResultZonesSSLValue = "off" - ZoneSettingListResponseResultZonesSSLValueFlexible ZoneSettingListResponseResultZonesSSLValue = "flexible" - ZoneSettingListResponseResultZonesSSLValueFull ZoneSettingListResponseResultZonesSSLValue = "full" - ZoneSettingListResponseResultZonesSSLValueStrict ZoneSettingListResponseResultZonesSSLValue = "strict" -) - -type ZoneSettingListResponseResultZonesSSLRecommender struct { - // Enrollment value for SSL/TLS Recommender. - ID ZoneSettingListResponseResultZonesSSLRecommenderID `json:"id"` - // ssl-recommender enrollment setting. - Enabled bool `json:"enabled"` - JSON zoneSettingListResponseResultZonesSSLRecommenderJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesSSLRecommenderJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesSSLRecommender] -type zoneSettingListResponseResultZonesSSLRecommenderJSON struct { - ID apijson.Field - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesSSLRecommender) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesSSLRecommender) implementsZoneSettingListResponseResult() {} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingListResponseResultZonesSSLRecommenderID string - -const ( - ZoneSettingListResponseResultZonesSSLRecommenderIDSSLRecommender ZoneSettingListResponseResultZonesSSLRecommenderID = "ssl_recommender" -) - -// Only allows TLS1.2. -type ZoneSettingListResponseResultZonesTLS1_2Only struct { - // Zone setting identifier. - ID ZoneSettingListResponseResultZonesTLS1_2OnlyID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesTLS1_2OnlyEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesTLS1_2OnlyValue `json:"value"` - JSON zoneSettingListResponseResultZonesTls1_2OnlyJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesTls1_2OnlyJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesTLS1_2Only] -type zoneSettingListResponseResultZonesTls1_2OnlyJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesTLS1_2Only) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesTLS1_2Only) implementsZoneSettingListResponseResult() {} - -// Zone setting identifier. -type ZoneSettingListResponseResultZonesTLS1_2OnlyID string - -const ( - ZoneSettingListResponseResultZonesTLS1_2OnlyIDTLS1_2Only ZoneSettingListResponseResultZonesTLS1_2OnlyID = "tls_1_2_only" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesTLS1_2OnlyEditable bool - -const ( - ZoneSettingListResponseResultZonesTLS1_2OnlyEditableTrue ZoneSettingListResponseResultZonesTLS1_2OnlyEditable = true - ZoneSettingListResponseResultZonesTLS1_2OnlyEditableFalse ZoneSettingListResponseResultZonesTLS1_2OnlyEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesTLS1_2OnlyValue string - -const ( - ZoneSettingListResponseResultZonesTLS1_2OnlyValueOff ZoneSettingListResponseResultZonesTLS1_2OnlyValue = "off" - ZoneSettingListResponseResultZonesTLS1_2OnlyValueOn ZoneSettingListResponseResultZonesTLS1_2OnlyValue = "on" -) - -// Enables Crypto TLS 1.3 feature for a zone. -type ZoneSettingListResponseResultZonesTLS1_3 struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesTLS1_3ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesTLS1_3Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingListResponseResultZonesTLS1_3Value `json:"value"` - JSON zoneSettingListResponseResultZonesTls1_3JSON `json:"-"` -} - -// zoneSettingListResponseResultZonesTls1_3JSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesTLS1_3] -type zoneSettingListResponseResultZonesTls1_3JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesTLS1_3) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesTLS1_3) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesTLS1_3ID string - -const ( - ZoneSettingListResponseResultZonesTLS1_3IDTLS1_3 ZoneSettingListResponseResultZonesTLS1_3ID = "tls_1_3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesTLS1_3Editable bool - -const ( - ZoneSettingListResponseResultZonesTLS1_3EditableTrue ZoneSettingListResponseResultZonesTLS1_3Editable = true - ZoneSettingListResponseResultZonesTLS1_3EditableFalse ZoneSettingListResponseResultZonesTLS1_3Editable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingListResponseResultZonesTLS1_3Value string - -const ( - ZoneSettingListResponseResultZonesTLS1_3ValueOn ZoneSettingListResponseResultZonesTLS1_3Value = "on" - ZoneSettingListResponseResultZonesTLS1_3ValueOff ZoneSettingListResponseResultZonesTLS1_3Value = "off" - ZoneSettingListResponseResultZonesTLS1_3ValueZrt ZoneSettingListResponseResultZonesTLS1_3Value = "zrt" -) - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -type ZoneSettingListResponseResultZonesTLSClientAuth struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesTLSClientAuthID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesTLSClientAuthEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // value of the zone setting. - Value ZoneSettingListResponseResultZonesTLSClientAuthValue `json:"value"` - JSON zoneSettingListResponseResultZonesTLSClientAuthJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesTLSClientAuthJSON contains the JSON metadata -// for the struct [ZoneSettingListResponseResultZonesTLSClientAuth] -type zoneSettingListResponseResultZonesTLSClientAuthJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesTLSClientAuth) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesTLSClientAuth) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesTLSClientAuthID string - -const ( - ZoneSettingListResponseResultZonesTLSClientAuthIDTLSClientAuth ZoneSettingListResponseResultZonesTLSClientAuthID = "tls_client_auth" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesTLSClientAuthEditable bool - -const ( - ZoneSettingListResponseResultZonesTLSClientAuthEditableTrue ZoneSettingListResponseResultZonesTLSClientAuthEditable = true - ZoneSettingListResponseResultZonesTLSClientAuthEditableFalse ZoneSettingListResponseResultZonesTLSClientAuthEditable = false -) - -// value of the zone setting. -type ZoneSettingListResponseResultZonesTLSClientAuthValue string - -const ( - ZoneSettingListResponseResultZonesTLSClientAuthValueOn ZoneSettingListResponseResultZonesTLSClientAuthValue = "on" - ZoneSettingListResponseResultZonesTLSClientAuthValueOff ZoneSettingListResponseResultZonesTLSClientAuthValue = "off" -) - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -type ZoneSettingListResponseResultZonesTrueClientIPHeader struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesTrueClientIPHeaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesTrueClientIPHeaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesTrueClientIPHeaderValue `json:"value"` - JSON zoneSettingListResponseResultZonesTrueClientIPHeaderJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesTrueClientIPHeaderJSON contains the JSON -// metadata for the struct [ZoneSettingListResponseResultZonesTrueClientIPHeader] -type zoneSettingListResponseResultZonesTrueClientIPHeaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesTrueClientIPHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesTrueClientIPHeader) implementsZoneSettingListResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesTrueClientIPHeaderID string - -const ( - ZoneSettingListResponseResultZonesTrueClientIPHeaderIDTrueClientIPHeader ZoneSettingListResponseResultZonesTrueClientIPHeaderID = "true_client_ip_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesTrueClientIPHeaderEditable bool - -const ( - ZoneSettingListResponseResultZonesTrueClientIPHeaderEditableTrue ZoneSettingListResponseResultZonesTrueClientIPHeaderEditable = true - ZoneSettingListResponseResultZonesTrueClientIPHeaderEditableFalse ZoneSettingListResponseResultZonesTrueClientIPHeaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesTrueClientIPHeaderValue string - -const ( - ZoneSettingListResponseResultZonesTrueClientIPHeaderValueOn ZoneSettingListResponseResultZonesTrueClientIPHeaderValue = "on" - ZoneSettingListResponseResultZonesTrueClientIPHeaderValueOff ZoneSettingListResponseResultZonesTrueClientIPHeaderValue = "off" -) - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -type ZoneSettingListResponseResultZonesWAF struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesWAFID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesWAFEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesWAFValue `json:"value"` - JSON zoneSettingListResponseResultZonesWAFJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesWAFJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesWAF] -type zoneSettingListResponseResultZonesWAFJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesWAF) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesWAF) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesWAFID string - -const ( - ZoneSettingListResponseResultZonesWAFIDWAF ZoneSettingListResponseResultZonesWAFID = "waf" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesWAFEditable bool - -const ( - ZoneSettingListResponseResultZonesWAFEditableTrue ZoneSettingListResponseResultZonesWAFEditable = true - ZoneSettingListResponseResultZonesWAFEditableFalse ZoneSettingListResponseResultZonesWAFEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesWAFValue string - -const ( - ZoneSettingListResponseResultZonesWAFValueOn ZoneSettingListResponseResultZonesWAFValue = "on" - ZoneSettingListResponseResultZonesWAFValueOff ZoneSettingListResponseResultZonesWAFValue = "off" -) - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -type ZoneSettingListResponseResultZonesWebp struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesWebpID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesWebpEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesWebpValue `json:"value"` - JSON zoneSettingListResponseResultZonesWebpJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesWebpJSON contains the JSON metadata for the -// struct [ZoneSettingListResponseResultZonesWebp] -type zoneSettingListResponseResultZonesWebpJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesWebp) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesWebp) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesWebpID string - -const ( - ZoneSettingListResponseResultZonesWebpIDWebp ZoneSettingListResponseResultZonesWebpID = "webp" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesWebpEditable bool - -const ( - ZoneSettingListResponseResultZonesWebpEditableTrue ZoneSettingListResponseResultZonesWebpEditable = true - ZoneSettingListResponseResultZonesWebpEditableFalse ZoneSettingListResponseResultZonesWebpEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesWebpValue string - -const ( - ZoneSettingListResponseResultZonesWebpValueOff ZoneSettingListResponseResultZonesWebpValue = "off" - ZoneSettingListResponseResultZonesWebpValueOn ZoneSettingListResponseResultZonesWebpValue = "on" -) - -// WebSockets are open connections sustained between the client and the origin -// server. Inside a WebSockets connection, the client and the origin can pass data -// back and forth without having to reestablish sessions. This makes exchanging -// data within a WebSockets connection fast. WebSockets are often used for -// real-time applications such as live chat and gaming. For more information refer -// to -// [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). -type ZoneSettingListResponseResultZonesWebsockets struct { - // ID of the zone setting. - ID ZoneSettingListResponseResultZonesWebsocketsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingListResponseResultZonesWebsocketsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingListResponseResultZonesWebsocketsValue `json:"value"` - JSON zoneSettingListResponseResultZonesWebsocketsJSON `json:"-"` -} - -// zoneSettingListResponseResultZonesWebsocketsJSON contains the JSON metadata for -// the struct [ZoneSettingListResponseResultZonesWebsockets] -type zoneSettingListResponseResultZonesWebsocketsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingListResponseResultZonesWebsockets) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingListResponseResultZonesWebsockets) implementsZoneSettingListResponseResult() {} - -// ID of the zone setting. -type ZoneSettingListResponseResultZonesWebsocketsID string - -const ( - ZoneSettingListResponseResultZonesWebsocketsIDWebsockets ZoneSettingListResponseResultZonesWebsocketsID = "websockets" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingListResponseResultZonesWebsocketsEditable bool - -const ( - ZoneSettingListResponseResultZonesWebsocketsEditableTrue ZoneSettingListResponseResultZonesWebsocketsEditable = true - ZoneSettingListResponseResultZonesWebsocketsEditableFalse ZoneSettingListResponseResultZonesWebsocketsEditable = false -) - -// Value of the zone setting. -type ZoneSettingListResponseResultZonesWebsocketsValue string - -const ( - ZoneSettingListResponseResultZonesWebsocketsValueOff ZoneSettingListResponseResultZonesWebsocketsValue = "off" - ZoneSettingListResponseResultZonesWebsocketsValueOn ZoneSettingListResponseResultZonesWebsocketsValue = "on" -) - -type ZoneSettingEditResponse struct { - Errors []ZoneSettingEditResponseError `json:"errors"` - Messages []ZoneSettingEditResponseMessage `json:"messages"` - Result []ZoneSettingEditResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingEditResponseJSON `json:"-"` -} - -// zoneSettingEditResponseJSON contains the JSON metadata for the struct -// [ZoneSettingEditResponse] -type zoneSettingEditResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEditResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEditResponseErrorJSON `json:"-"` -} - -// zoneSettingEditResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingEditResponseError] -type zoneSettingEditResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEditResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEditResponseMessageJSON `json:"-"` -} - -// zoneSettingEditResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingEditResponseMessage] -type zoneSettingEditResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// 0-RTT session resumption enabled for this zone. -// -// Union satisfied by [ZoneSettingEditResponseResultZones0rtt], -// [ZoneSettingEditResponseResultZonesAdvancedDDOS], -// [ZoneSettingEditResponseResultZonesAlwaysOnline], -// [ZoneSettingEditResponseResultZonesAlwaysUseHTTPs], -// [ZoneSettingEditResponseResultZonesAutomaticHTTPsRewrites], -// [ZoneSettingEditResponseResultZonesBrotli], -// [ZoneSettingEditResponseResultZonesBrowserCacheTTL], -// [ZoneSettingEditResponseResultZonesBrowserCheck], -// [ZoneSettingEditResponseResultZonesCacheLevel], -// [ZoneSettingEditResponseResultZonesChallengeTTL], -// [ZoneSettingEditResponseResultZonesCiphers], -// [ZoneSettingEditResponseResultZonesCnameFlattening], -// [ZoneSettingEditResponseResultZonesDevelopmentMode], -// [ZoneSettingEditResponseResultZonesEarlyHints], -// [ZoneSettingEditResponseResultZonesEdgeCacheTTL], -// [ZoneSettingEditResponseResultZonesEmailObfuscation], -// [ZoneSettingEditResponseResultZonesH2Prioritization], -// [ZoneSettingEditResponseResultZonesHotlinkProtection], -// [ZoneSettingEditResponseResultZonesHTTP2], -// [ZoneSettingEditResponseResultZonesHTTP3], -// [ZoneSettingEditResponseResultZonesImageResizing], -// [ZoneSettingEditResponseResultZonesIPGeolocation], -// [ZoneSettingEditResponseResultZonesIPV6], -// [ZoneSettingEditResponseResultZonesMaxUpload], -// [ZoneSettingEditResponseResultZonesMinTLSVersion], -// [ZoneSettingEditResponseResultZonesMinify], -// [ZoneSettingEditResponseResultZonesMirage], -// [ZoneSettingEditResponseResultZonesMobileRedirect], -// [ZoneSettingEditResponseResultZonesNEL], -// [ZoneSettingEditResponseResultZonesOpportunisticEncryption], -// [ZoneSettingEditResponseResultZonesOpportunisticOnion], -// [ZoneSettingEditResponseResultZonesOrangeToOrange], -// [ZoneSettingEditResponseResultZonesOriginErrorPagePassThru], -// [ZoneSettingEditResponseResultZonesOriginMaxHTTPVersion], -// [ZoneSettingEditResponseResultZonesPolish], -// [ZoneSettingEditResponseResultZonesPrefetchPreload], -// [ZoneSettingEditResponseResultZonesProxyReadTimeout], -// [ZoneSettingEditResponseResultZonesPseudoIpv4], -// [ZoneSettingEditResponseResultZonesResponseBuffering], -// [ZoneSettingEditResponseResultZonesRocketLoader], -// [ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimization], -// [ZoneSettingEditResponseResultZonesSecurityHeader], -// [ZoneSettingEditResponseResultZonesSecurityLevel], -// [ZoneSettingEditResponseResultZonesServerSideExclude], -// [ZoneSettingEditResponseResultZonesSha1Support], -// [ZoneSettingEditResponseResultZonesSortQueryStringForCache], -// [ZoneSettingEditResponseResultZonesSSL], -// [ZoneSettingEditResponseResultZonesSSLRecommender], -// [ZoneSettingEditResponseResultZonesTLS1_2Only], -// [ZoneSettingEditResponseResultZonesTLS1_3], -// [ZoneSettingEditResponseResultZonesTLSClientAuth], -// [ZoneSettingEditResponseResultZonesTrueClientIPHeader], -// [ZoneSettingEditResponseResultZonesWAF], -// [ZoneSettingEditResponseResultZonesWebp] or -// [ZoneSettingEditResponseResultZonesWebsockets]. -type ZoneSettingEditResponseResult interface { - implementsZoneSettingEditResponseResult() -} - -func init() { - apijson.RegisterUnion(reflect.TypeOf((*ZoneSettingEditResponseResult)(nil)).Elem(), "") -} - -// 0-RTT session resumption enabled for this zone. -type ZoneSettingEditResponseResultZones0rtt struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZones0rttID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZones0rttEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the 0-RTT setting. - Value ZoneSettingEditResponseResultZones0rttValue `json:"value"` - JSON zoneSettingEditResponseResultZones0rttJSON `json:"-"` -} - -// zoneSettingEditResponseResultZones0rttJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZones0rtt] -type zoneSettingEditResponseResultZones0rttJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZones0rtt) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZones0rtt) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZones0rttID string - -const ( - ZoneSettingEditResponseResultZones0rttID0rtt ZoneSettingEditResponseResultZones0rttID = "0rtt" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZones0rttEditable bool - -const ( - ZoneSettingEditResponseResultZones0rttEditableTrue ZoneSettingEditResponseResultZones0rttEditable = true - ZoneSettingEditResponseResultZones0rttEditableFalse ZoneSettingEditResponseResultZones0rttEditable = false -) - -// Value of the 0-RTT setting. -type ZoneSettingEditResponseResultZones0rttValue string - -const ( - ZoneSettingEditResponseResultZones0rttValueOn ZoneSettingEditResponseResultZones0rttValue = "on" - ZoneSettingEditResponseResultZones0rttValueOff ZoneSettingEditResponseResultZones0rttValue = "off" -) - -// Advanced protection from Distributed Denial of Service (DDoS) attacks on your -// website. This is an uneditable value that is 'on' in the case of Business and -// Enterprise zones. -type ZoneSettingEditResponseResultZonesAdvancedDDOS struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesAdvancedDDOSID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesAdvancedDDOSEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Defaults to on for Business+ plans - Value ZoneSettingEditResponseResultZonesAdvancedDDOSValue `json:"value"` - JSON zoneSettingEditResponseResultZonesAdvancedDDOSJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesAdvancedDDOSJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesAdvancedDDOS] -type zoneSettingEditResponseResultZonesAdvancedDDOSJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesAdvancedDDOS) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesAdvancedDDOS) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesAdvancedDDOSID string - -const ( - ZoneSettingEditResponseResultZonesAdvancedDDOSIDAdvancedDDOS ZoneSettingEditResponseResultZonesAdvancedDDOSID = "advanced_ddos" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesAdvancedDDOSEditable bool - -const ( - ZoneSettingEditResponseResultZonesAdvancedDDOSEditableTrue ZoneSettingEditResponseResultZonesAdvancedDDOSEditable = true - ZoneSettingEditResponseResultZonesAdvancedDDOSEditableFalse ZoneSettingEditResponseResultZonesAdvancedDDOSEditable = false -) - -// Value of the zone setting. Notes: Defaults to on for Business+ plans -type ZoneSettingEditResponseResultZonesAdvancedDDOSValue string - -const ( - ZoneSettingEditResponseResultZonesAdvancedDDOSValueOn ZoneSettingEditResponseResultZonesAdvancedDDOSValue = "on" - ZoneSettingEditResponseResultZonesAdvancedDDOSValueOff ZoneSettingEditResponseResultZonesAdvancedDDOSValue = "off" -) - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -type ZoneSettingEditResponseResultZonesAlwaysOnline struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesAlwaysOnlineID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesAlwaysOnlineEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesAlwaysOnlineValue `json:"value"` - JSON zoneSettingEditResponseResultZonesAlwaysOnlineJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesAlwaysOnlineJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesAlwaysOnline] -type zoneSettingEditResponseResultZonesAlwaysOnlineJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesAlwaysOnline) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesAlwaysOnline) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesAlwaysOnlineID string - -const ( - ZoneSettingEditResponseResultZonesAlwaysOnlineIDAlwaysOnline ZoneSettingEditResponseResultZonesAlwaysOnlineID = "always_online" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesAlwaysOnlineEditable bool - -const ( - ZoneSettingEditResponseResultZonesAlwaysOnlineEditableTrue ZoneSettingEditResponseResultZonesAlwaysOnlineEditable = true - ZoneSettingEditResponseResultZonesAlwaysOnlineEditableFalse ZoneSettingEditResponseResultZonesAlwaysOnlineEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesAlwaysOnlineValue string - -const ( - ZoneSettingEditResponseResultZonesAlwaysOnlineValueOn ZoneSettingEditResponseResultZonesAlwaysOnlineValue = "on" - ZoneSettingEditResponseResultZonesAlwaysOnlineValueOff ZoneSettingEditResponseResultZonesAlwaysOnlineValue = "off" -) - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -type ZoneSettingEditResponseResultZonesAlwaysUseHTTPs struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesAlwaysUseHTTPsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValue `json:"value"` - JSON zoneSettingEditResponseResultZonesAlwaysUseHTTPsJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesAlwaysUseHTTPsJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesAlwaysUseHTTPs] -type zoneSettingEditResponseResultZonesAlwaysUseHTTPsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesAlwaysUseHTTPs) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesAlwaysUseHTTPs) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesAlwaysUseHTTPsID string - -const ( - ZoneSettingEditResponseResultZonesAlwaysUseHTTPsIDAlwaysUseHTTPs ZoneSettingEditResponseResultZonesAlwaysUseHTTPsID = "always_use_https" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditable bool - -const ( - ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditableTrue ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditable = true - ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditableFalse ZoneSettingEditResponseResultZonesAlwaysUseHTTPsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValue string - -const ( - ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValueOn ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValue = "on" - ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValueOff ZoneSettingEditResponseResultZonesAlwaysUseHTTPsValue = "off" -) - -// Enable the Automatic HTTPS Rewrites feature for this zone. -type ZoneSettingEditResponseResultZonesAutomaticHTTPsRewrites struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValue `json:"value"` - JSON zoneSettingEditResponseResultZonesAutomaticHTTPsRewritesJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesAutomaticHTTPsRewritesJSON contains the JSON -// metadata for the struct -// [ZoneSettingEditResponseResultZonesAutomaticHTTPsRewrites] -type zoneSettingEditResponseResultZonesAutomaticHTTPsRewritesJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesAutomaticHTTPsRewrites) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesAutomaticHTTPsRewrites) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesID string - -const ( - ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesIDAutomaticHTTPsRewrites ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesID = "automatic_https_rewrites" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditable bool - -const ( - ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditableTrue ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditable = true - ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditableFalse ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValue string - -const ( - ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValueOn ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValue = "on" - ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValueOff ZoneSettingEditResponseResultZonesAutomaticHTTPsRewritesValue = "off" -) - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -type ZoneSettingEditResponseResultZonesBrotli struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesBrotliID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesBrotliEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesBrotliValue `json:"value"` - JSON zoneSettingEditResponseResultZonesBrotliJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesBrotliJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesBrotli] -type zoneSettingEditResponseResultZonesBrotliJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesBrotli) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesBrotli) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesBrotliID string - -const ( - ZoneSettingEditResponseResultZonesBrotliIDBrotli ZoneSettingEditResponseResultZonesBrotliID = "brotli" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesBrotliEditable bool - -const ( - ZoneSettingEditResponseResultZonesBrotliEditableTrue ZoneSettingEditResponseResultZonesBrotliEditable = true - ZoneSettingEditResponseResultZonesBrotliEditableFalse ZoneSettingEditResponseResultZonesBrotliEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesBrotliValue string - -const ( - ZoneSettingEditResponseResultZonesBrotliValueOff ZoneSettingEditResponseResultZonesBrotliValue = "off" - ZoneSettingEditResponseResultZonesBrotliValueOn ZoneSettingEditResponseResultZonesBrotliValue = "on" -) - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -type ZoneSettingEditResponseResultZonesBrowserCacheTTL struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesBrowserCacheTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesBrowserCacheTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value ZoneSettingEditResponseResultZonesBrowserCacheTTLValue `json:"value"` - JSON zoneSettingEditResponseResultZonesBrowserCacheTTLJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesBrowserCacheTTLJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesBrowserCacheTTL] -type zoneSettingEditResponseResultZonesBrowserCacheTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesBrowserCacheTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesBrowserCacheTTL) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesBrowserCacheTTLID string - -const ( - ZoneSettingEditResponseResultZonesBrowserCacheTTLIDBrowserCacheTTL ZoneSettingEditResponseResultZonesBrowserCacheTTLID = "browser_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesBrowserCacheTTLEditable bool - -const ( - ZoneSettingEditResponseResultZonesBrowserCacheTTLEditableTrue ZoneSettingEditResponseResultZonesBrowserCacheTTLEditable = true - ZoneSettingEditResponseResultZonesBrowserCacheTTLEditableFalse ZoneSettingEditResponseResultZonesBrowserCacheTTLEditable = false -) - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingEditResponseResultZonesBrowserCacheTTLValue float64 - -const ( - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue0 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 0 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue30 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 30 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue60 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 60 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue120 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 120 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue300 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 300 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue1200 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 1200 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue1800 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 1800 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue3600 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 3600 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue7200 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 7200 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue10800 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 10800 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue14400 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 14400 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue18000 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 18000 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue28800 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 28800 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue43200 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 43200 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue57600 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 57600 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue72000 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 72000 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue86400 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 86400 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue172800 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 172800 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue259200 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 259200 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue345600 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 345600 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue432000 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 432000 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue691200 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 691200 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue1382400 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 1382400 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue2073600 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 2073600 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue2678400 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 2678400 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue5356800 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 5356800 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue16070400 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 16070400 - ZoneSettingEditResponseResultZonesBrowserCacheTTLValue31536000 ZoneSettingEditResponseResultZonesBrowserCacheTTLValue = 31536000 -) - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -type ZoneSettingEditResponseResultZonesBrowserCheck struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesBrowserCheckID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesBrowserCheckEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesBrowserCheckValue `json:"value"` - JSON zoneSettingEditResponseResultZonesBrowserCheckJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesBrowserCheckJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesBrowserCheck] -type zoneSettingEditResponseResultZonesBrowserCheckJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesBrowserCheck) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesBrowserCheck) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesBrowserCheckID string - -const ( - ZoneSettingEditResponseResultZonesBrowserCheckIDBrowserCheck ZoneSettingEditResponseResultZonesBrowserCheckID = "browser_check" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesBrowserCheckEditable bool - -const ( - ZoneSettingEditResponseResultZonesBrowserCheckEditableTrue ZoneSettingEditResponseResultZonesBrowserCheckEditable = true - ZoneSettingEditResponseResultZonesBrowserCheckEditableFalse ZoneSettingEditResponseResultZonesBrowserCheckEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesBrowserCheckValue string - -const ( - ZoneSettingEditResponseResultZonesBrowserCheckValueOn ZoneSettingEditResponseResultZonesBrowserCheckValue = "on" - ZoneSettingEditResponseResultZonesBrowserCheckValueOff ZoneSettingEditResponseResultZonesBrowserCheckValue = "off" -) - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -type ZoneSettingEditResponseResultZonesCacheLevel struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesCacheLevelID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesCacheLevelEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesCacheLevelValue `json:"value"` - JSON zoneSettingEditResponseResultZonesCacheLevelJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesCacheLevelJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesCacheLevel] -type zoneSettingEditResponseResultZonesCacheLevelJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesCacheLevel) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesCacheLevel) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesCacheLevelID string - -const ( - ZoneSettingEditResponseResultZonesCacheLevelIDCacheLevel ZoneSettingEditResponseResultZonesCacheLevelID = "cache_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesCacheLevelEditable bool - -const ( - ZoneSettingEditResponseResultZonesCacheLevelEditableTrue ZoneSettingEditResponseResultZonesCacheLevelEditable = true - ZoneSettingEditResponseResultZonesCacheLevelEditableFalse ZoneSettingEditResponseResultZonesCacheLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesCacheLevelValue string - -const ( - ZoneSettingEditResponseResultZonesCacheLevelValueAggressive ZoneSettingEditResponseResultZonesCacheLevelValue = "aggressive" - ZoneSettingEditResponseResultZonesCacheLevelValueBasic ZoneSettingEditResponseResultZonesCacheLevelValue = "basic" - ZoneSettingEditResponseResultZonesCacheLevelValueSimplified ZoneSettingEditResponseResultZonesCacheLevelValue = "simplified" -) - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -type ZoneSettingEditResponseResultZonesChallengeTTL struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesChallengeTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesChallengeTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesChallengeTTLValue `json:"value"` - JSON zoneSettingEditResponseResultZonesChallengeTTLJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesChallengeTTLJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesChallengeTTL] -type zoneSettingEditResponseResultZonesChallengeTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesChallengeTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesChallengeTTL) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesChallengeTTLID string - -const ( - ZoneSettingEditResponseResultZonesChallengeTTLIDChallengeTTL ZoneSettingEditResponseResultZonesChallengeTTLID = "challenge_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesChallengeTTLEditable bool - -const ( - ZoneSettingEditResponseResultZonesChallengeTTLEditableTrue ZoneSettingEditResponseResultZonesChallengeTTLEditable = true - ZoneSettingEditResponseResultZonesChallengeTTLEditableFalse ZoneSettingEditResponseResultZonesChallengeTTLEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesChallengeTTLValue float64 - -const ( - ZoneSettingEditResponseResultZonesChallengeTTLValue300 ZoneSettingEditResponseResultZonesChallengeTTLValue = 300 - ZoneSettingEditResponseResultZonesChallengeTTLValue900 ZoneSettingEditResponseResultZonesChallengeTTLValue = 900 - ZoneSettingEditResponseResultZonesChallengeTTLValue1800 ZoneSettingEditResponseResultZonesChallengeTTLValue = 1800 - ZoneSettingEditResponseResultZonesChallengeTTLValue2700 ZoneSettingEditResponseResultZonesChallengeTTLValue = 2700 - ZoneSettingEditResponseResultZonesChallengeTTLValue3600 ZoneSettingEditResponseResultZonesChallengeTTLValue = 3600 - ZoneSettingEditResponseResultZonesChallengeTTLValue7200 ZoneSettingEditResponseResultZonesChallengeTTLValue = 7200 - ZoneSettingEditResponseResultZonesChallengeTTLValue10800 ZoneSettingEditResponseResultZonesChallengeTTLValue = 10800 - ZoneSettingEditResponseResultZonesChallengeTTLValue14400 ZoneSettingEditResponseResultZonesChallengeTTLValue = 14400 - ZoneSettingEditResponseResultZonesChallengeTTLValue28800 ZoneSettingEditResponseResultZonesChallengeTTLValue = 28800 - ZoneSettingEditResponseResultZonesChallengeTTLValue57600 ZoneSettingEditResponseResultZonesChallengeTTLValue = 57600 - ZoneSettingEditResponseResultZonesChallengeTTLValue86400 ZoneSettingEditResponseResultZonesChallengeTTLValue = 86400 - ZoneSettingEditResponseResultZonesChallengeTTLValue604800 ZoneSettingEditResponseResultZonesChallengeTTLValue = 604800 - ZoneSettingEditResponseResultZonesChallengeTTLValue2592000 ZoneSettingEditResponseResultZonesChallengeTTLValue = 2592000 - ZoneSettingEditResponseResultZonesChallengeTTLValue31536000 ZoneSettingEditResponseResultZonesChallengeTTLValue = 31536000 -) - -// An allowlist of ciphers for TLS termination. These ciphers must be in the -// BoringSSL format. -type ZoneSettingEditResponseResultZonesCiphers struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesCiphersID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesCiphersEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value []string `json:"value"` - JSON zoneSettingEditResponseResultZonesCiphersJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesCiphersJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesCiphers] -type zoneSettingEditResponseResultZonesCiphersJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesCiphers) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesCiphers) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesCiphersID string - -const ( - ZoneSettingEditResponseResultZonesCiphersIDCiphers ZoneSettingEditResponseResultZonesCiphersID = "ciphers" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesCiphersEditable bool - -const ( - ZoneSettingEditResponseResultZonesCiphersEditableTrue ZoneSettingEditResponseResultZonesCiphersEditable = true - ZoneSettingEditResponseResultZonesCiphersEditableFalse ZoneSettingEditResponseResultZonesCiphersEditable = false -) - -// Whether or not cname flattening is on. -type ZoneSettingEditResponseResultZonesCnameFlattening struct { - // How to flatten the cname destination. - ID ZoneSettingEditResponseResultZonesCnameFlatteningID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesCnameFlatteningEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the cname flattening setting. - Value ZoneSettingEditResponseResultZonesCnameFlatteningValue `json:"value"` - JSON zoneSettingEditResponseResultZonesCnameFlatteningJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesCnameFlatteningJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesCnameFlattening] -type zoneSettingEditResponseResultZonesCnameFlatteningJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesCnameFlattening) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesCnameFlattening) implementsZoneSettingEditResponseResult() { -} - -// How to flatten the cname destination. -type ZoneSettingEditResponseResultZonesCnameFlatteningID string - -const ( - ZoneSettingEditResponseResultZonesCnameFlatteningIDCnameFlattening ZoneSettingEditResponseResultZonesCnameFlatteningID = "cname_flattening" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesCnameFlatteningEditable bool - -const ( - ZoneSettingEditResponseResultZonesCnameFlatteningEditableTrue ZoneSettingEditResponseResultZonesCnameFlatteningEditable = true - ZoneSettingEditResponseResultZonesCnameFlatteningEditableFalse ZoneSettingEditResponseResultZonesCnameFlatteningEditable = false -) - -// Value of the cname flattening setting. -type ZoneSettingEditResponseResultZonesCnameFlatteningValue string - -const ( - ZoneSettingEditResponseResultZonesCnameFlatteningValueFlattenAtRoot ZoneSettingEditResponseResultZonesCnameFlatteningValue = "flatten_at_root" - ZoneSettingEditResponseResultZonesCnameFlatteningValueFlattenAll ZoneSettingEditResponseResultZonesCnameFlatteningValue = "flatten_all" -) - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -type ZoneSettingEditResponseResultZonesDevelopmentMode struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesDevelopmentModeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesDevelopmentModeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The interval (in seconds) from when - // development mode expires (positive integer) or last expired (negative integer) - // for the domain. If development mode has never been enabled, this value is false. - TimeRemaining float64 `json:"time_remaining"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesDevelopmentModeValue `json:"value"` - JSON zoneSettingEditResponseResultZonesDevelopmentModeJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesDevelopmentModeJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesDevelopmentMode] -type zoneSettingEditResponseResultZonesDevelopmentModeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - TimeRemaining apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesDevelopmentMode) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesDevelopmentMode) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesDevelopmentModeID string - -const ( - ZoneSettingEditResponseResultZonesDevelopmentModeIDDevelopmentMode ZoneSettingEditResponseResultZonesDevelopmentModeID = "development_mode" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesDevelopmentModeEditable bool - -const ( - ZoneSettingEditResponseResultZonesDevelopmentModeEditableTrue ZoneSettingEditResponseResultZonesDevelopmentModeEditable = true - ZoneSettingEditResponseResultZonesDevelopmentModeEditableFalse ZoneSettingEditResponseResultZonesDevelopmentModeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesDevelopmentModeValue string - -const ( - ZoneSettingEditResponseResultZonesDevelopmentModeValueOn ZoneSettingEditResponseResultZonesDevelopmentModeValue = "on" - ZoneSettingEditResponseResultZonesDevelopmentModeValueOff ZoneSettingEditResponseResultZonesDevelopmentModeValue = "off" -) - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -type ZoneSettingEditResponseResultZonesEarlyHints struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesEarlyHintsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesEarlyHintsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesEarlyHintsValue `json:"value"` - JSON zoneSettingEditResponseResultZonesEarlyHintsJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesEarlyHintsJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesEarlyHints] -type zoneSettingEditResponseResultZonesEarlyHintsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesEarlyHints) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesEarlyHints) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesEarlyHintsID string - -const ( - ZoneSettingEditResponseResultZonesEarlyHintsIDEarlyHints ZoneSettingEditResponseResultZonesEarlyHintsID = "early_hints" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesEarlyHintsEditable bool - -const ( - ZoneSettingEditResponseResultZonesEarlyHintsEditableTrue ZoneSettingEditResponseResultZonesEarlyHintsEditable = true - ZoneSettingEditResponseResultZonesEarlyHintsEditableFalse ZoneSettingEditResponseResultZonesEarlyHintsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesEarlyHintsValue string - -const ( - ZoneSettingEditResponseResultZonesEarlyHintsValueOn ZoneSettingEditResponseResultZonesEarlyHintsValue = "on" - ZoneSettingEditResponseResultZonesEarlyHintsValueOff ZoneSettingEditResponseResultZonesEarlyHintsValue = "off" -) - -// Time (in seconds) that a resource will be ensured to remain on Cloudflare's -// cache servers. -type ZoneSettingEditResponseResultZonesEdgeCacheTTL struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesEdgeCacheTTLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesEdgeCacheTTLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The minimum TTL available depends on the plan - // level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) - Value ZoneSettingEditResponseResultZonesEdgeCacheTTLValue `json:"value"` - JSON zoneSettingEditResponseResultZonesEdgeCacheTTLJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesEdgeCacheTTLJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesEdgeCacheTTL] -type zoneSettingEditResponseResultZonesEdgeCacheTTLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesEdgeCacheTTL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesEdgeCacheTTL) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesEdgeCacheTTLID string - -const ( - ZoneSettingEditResponseResultZonesEdgeCacheTTLIDEdgeCacheTTL ZoneSettingEditResponseResultZonesEdgeCacheTTLID = "edge_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesEdgeCacheTTLEditable bool - -const ( - ZoneSettingEditResponseResultZonesEdgeCacheTTLEditableTrue ZoneSettingEditResponseResultZonesEdgeCacheTTLEditable = true - ZoneSettingEditResponseResultZonesEdgeCacheTTLEditableFalse ZoneSettingEditResponseResultZonesEdgeCacheTTLEditable = false -) - -// Value of the zone setting. Notes: The minimum TTL available depends on the plan -// level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) -type ZoneSettingEditResponseResultZonesEdgeCacheTTLValue float64 - -const ( - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue30 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 30 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue60 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 60 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue300 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 300 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue1200 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 1200 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue1800 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 1800 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue3600 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 3600 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue7200 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 7200 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue10800 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 10800 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue14400 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 14400 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue18000 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 18000 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue28800 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 28800 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue43200 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 43200 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue57600 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 57600 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue72000 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 72000 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue86400 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 86400 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue172800 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 172800 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue259200 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 259200 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue345600 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 345600 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue432000 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 432000 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue518400 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 518400 - ZoneSettingEditResponseResultZonesEdgeCacheTTLValue604800 ZoneSettingEditResponseResultZonesEdgeCacheTTLValue = 604800 -) - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -type ZoneSettingEditResponseResultZonesEmailObfuscation struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesEmailObfuscationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesEmailObfuscationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesEmailObfuscationValue `json:"value"` - JSON zoneSettingEditResponseResultZonesEmailObfuscationJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesEmailObfuscationJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesEmailObfuscation] -type zoneSettingEditResponseResultZonesEmailObfuscationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesEmailObfuscation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesEmailObfuscation) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesEmailObfuscationID string - -const ( - ZoneSettingEditResponseResultZonesEmailObfuscationIDEmailObfuscation ZoneSettingEditResponseResultZonesEmailObfuscationID = "email_obfuscation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesEmailObfuscationEditable bool - -const ( - ZoneSettingEditResponseResultZonesEmailObfuscationEditableTrue ZoneSettingEditResponseResultZonesEmailObfuscationEditable = true - ZoneSettingEditResponseResultZonesEmailObfuscationEditableFalse ZoneSettingEditResponseResultZonesEmailObfuscationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesEmailObfuscationValue string - -const ( - ZoneSettingEditResponseResultZonesEmailObfuscationValueOn ZoneSettingEditResponseResultZonesEmailObfuscationValue = "on" - ZoneSettingEditResponseResultZonesEmailObfuscationValueOff ZoneSettingEditResponseResultZonesEmailObfuscationValue = "off" -) - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingEditResponseResultZonesH2Prioritization struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesH2PrioritizationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesH2PrioritizationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesH2PrioritizationValue `json:"value"` - JSON zoneSettingEditResponseResultZonesH2PrioritizationJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesH2PrioritizationJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesH2Prioritization] -type zoneSettingEditResponseResultZonesH2PrioritizationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesH2Prioritization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesH2Prioritization) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesH2PrioritizationID string - -const ( - ZoneSettingEditResponseResultZonesH2PrioritizationIDH2Prioritization ZoneSettingEditResponseResultZonesH2PrioritizationID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesH2PrioritizationEditable bool - -const ( - ZoneSettingEditResponseResultZonesH2PrioritizationEditableTrue ZoneSettingEditResponseResultZonesH2PrioritizationEditable = true - ZoneSettingEditResponseResultZonesH2PrioritizationEditableFalse ZoneSettingEditResponseResultZonesH2PrioritizationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesH2PrioritizationValue string - -const ( - ZoneSettingEditResponseResultZonesH2PrioritizationValueOn ZoneSettingEditResponseResultZonesH2PrioritizationValue = "on" - ZoneSettingEditResponseResultZonesH2PrioritizationValueOff ZoneSettingEditResponseResultZonesH2PrioritizationValue = "off" - ZoneSettingEditResponseResultZonesH2PrioritizationValueCustom ZoneSettingEditResponseResultZonesH2PrioritizationValue = "custom" -) - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -type ZoneSettingEditResponseResultZonesHotlinkProtection struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesHotlinkProtectionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesHotlinkProtectionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesHotlinkProtectionValue `json:"value"` - JSON zoneSettingEditResponseResultZonesHotlinkProtectionJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesHotlinkProtectionJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesHotlinkProtection] -type zoneSettingEditResponseResultZonesHotlinkProtectionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesHotlinkProtection) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesHotlinkProtection) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesHotlinkProtectionID string - -const ( - ZoneSettingEditResponseResultZonesHotlinkProtectionIDHotlinkProtection ZoneSettingEditResponseResultZonesHotlinkProtectionID = "hotlink_protection" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesHotlinkProtectionEditable bool - -const ( - ZoneSettingEditResponseResultZonesHotlinkProtectionEditableTrue ZoneSettingEditResponseResultZonesHotlinkProtectionEditable = true - ZoneSettingEditResponseResultZonesHotlinkProtectionEditableFalse ZoneSettingEditResponseResultZonesHotlinkProtectionEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesHotlinkProtectionValue string - -const ( - ZoneSettingEditResponseResultZonesHotlinkProtectionValueOn ZoneSettingEditResponseResultZonesHotlinkProtectionValue = "on" - ZoneSettingEditResponseResultZonesHotlinkProtectionValueOff ZoneSettingEditResponseResultZonesHotlinkProtectionValue = "off" -) - -// HTTP2 enabled for this zone. -type ZoneSettingEditResponseResultZonesHTTP2 struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesHTTP2ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesHTTP2Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP2 setting. - Value ZoneSettingEditResponseResultZonesHTTP2Value `json:"value"` - JSON zoneSettingEditResponseResultZonesHTTP2JSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesHTTP2JSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesHTTP2] -type zoneSettingEditResponseResultZonesHTTP2JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesHTTP2) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesHTTP2) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesHTTP2ID string - -const ( - ZoneSettingEditResponseResultZonesHTTP2IDHTTP2 ZoneSettingEditResponseResultZonesHTTP2ID = "http2" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesHTTP2Editable bool - -const ( - ZoneSettingEditResponseResultZonesHTTP2EditableTrue ZoneSettingEditResponseResultZonesHTTP2Editable = true - ZoneSettingEditResponseResultZonesHTTP2EditableFalse ZoneSettingEditResponseResultZonesHTTP2Editable = false -) - -// Value of the HTTP2 setting. -type ZoneSettingEditResponseResultZonesHTTP2Value string - -const ( - ZoneSettingEditResponseResultZonesHTTP2ValueOn ZoneSettingEditResponseResultZonesHTTP2Value = "on" - ZoneSettingEditResponseResultZonesHTTP2ValueOff ZoneSettingEditResponseResultZonesHTTP2Value = "off" -) - -// HTTP3 enabled for this zone. -type ZoneSettingEditResponseResultZonesHTTP3 struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesHTTP3ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesHTTP3Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP3 setting. - Value ZoneSettingEditResponseResultZonesHTTP3Value `json:"value"` - JSON zoneSettingEditResponseResultZonesHTTP3JSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesHTTP3JSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesHTTP3] -type zoneSettingEditResponseResultZonesHTTP3JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesHTTP3) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesHTTP3) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesHTTP3ID string - -const ( - ZoneSettingEditResponseResultZonesHTTP3IDHTTP3 ZoneSettingEditResponseResultZonesHTTP3ID = "http3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesHTTP3Editable bool - -const ( - ZoneSettingEditResponseResultZonesHTTP3EditableTrue ZoneSettingEditResponseResultZonesHTTP3Editable = true - ZoneSettingEditResponseResultZonesHTTP3EditableFalse ZoneSettingEditResponseResultZonesHTTP3Editable = false -) - -// Value of the HTTP3 setting. -type ZoneSettingEditResponseResultZonesHTTP3Value string - -const ( - ZoneSettingEditResponseResultZonesHTTP3ValueOn ZoneSettingEditResponseResultZonesHTTP3Value = "on" - ZoneSettingEditResponseResultZonesHTTP3ValueOff ZoneSettingEditResponseResultZonesHTTP3Value = "off" -) - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingEditResponseResultZonesImageResizing struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesImageResizingID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesImageResizingEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value ZoneSettingEditResponseResultZonesImageResizingValue `json:"value"` - JSON zoneSettingEditResponseResultZonesImageResizingJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesImageResizingJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesImageResizing] -type zoneSettingEditResponseResultZonesImageResizingJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesImageResizing) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesImageResizing) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesImageResizingID string - -const ( - ZoneSettingEditResponseResultZonesImageResizingIDImageResizing ZoneSettingEditResponseResultZonesImageResizingID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesImageResizingEditable bool - -const ( - ZoneSettingEditResponseResultZonesImageResizingEditableTrue ZoneSettingEditResponseResultZonesImageResizingEditable = true - ZoneSettingEditResponseResultZonesImageResizingEditableFalse ZoneSettingEditResponseResultZonesImageResizingEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingEditResponseResultZonesImageResizingValue string - -const ( - ZoneSettingEditResponseResultZonesImageResizingValueOn ZoneSettingEditResponseResultZonesImageResizingValue = "on" - ZoneSettingEditResponseResultZonesImageResizingValueOff ZoneSettingEditResponseResultZonesImageResizingValue = "off" - ZoneSettingEditResponseResultZonesImageResizingValueOpen ZoneSettingEditResponseResultZonesImageResizingValue = "open" -) - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -type ZoneSettingEditResponseResultZonesIPGeolocation struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesIPGeolocationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesIPGeolocationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesIPGeolocationValue `json:"value"` - JSON zoneSettingEditResponseResultZonesIPGeolocationJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesIPGeolocationJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesIPGeolocation] -type zoneSettingEditResponseResultZonesIPGeolocationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesIPGeolocation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesIPGeolocation) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesIPGeolocationID string - -const ( - ZoneSettingEditResponseResultZonesIPGeolocationIDIPGeolocation ZoneSettingEditResponseResultZonesIPGeolocationID = "ip_geolocation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesIPGeolocationEditable bool - -const ( - ZoneSettingEditResponseResultZonesIPGeolocationEditableTrue ZoneSettingEditResponseResultZonesIPGeolocationEditable = true - ZoneSettingEditResponseResultZonesIPGeolocationEditableFalse ZoneSettingEditResponseResultZonesIPGeolocationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesIPGeolocationValue string - -const ( - ZoneSettingEditResponseResultZonesIPGeolocationValueOn ZoneSettingEditResponseResultZonesIPGeolocationValue = "on" - ZoneSettingEditResponseResultZonesIPGeolocationValueOff ZoneSettingEditResponseResultZonesIPGeolocationValue = "off" -) - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -type ZoneSettingEditResponseResultZonesIPV6 struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesIPV6ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesIPV6Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesIPV6Value `json:"value"` - JSON zoneSettingEditResponseResultZonesIPV6JSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesIPV6JSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesIPV6] -type zoneSettingEditResponseResultZonesIPV6JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesIPV6) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesIPV6) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesIPV6ID string - -const ( - ZoneSettingEditResponseResultZonesIPV6IDIPV6 ZoneSettingEditResponseResultZonesIPV6ID = "ipv6" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesIPV6Editable bool - -const ( - ZoneSettingEditResponseResultZonesIPV6EditableTrue ZoneSettingEditResponseResultZonesIPV6Editable = true - ZoneSettingEditResponseResultZonesIPV6EditableFalse ZoneSettingEditResponseResultZonesIPV6Editable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesIPV6Value string - -const ( - ZoneSettingEditResponseResultZonesIPV6ValueOff ZoneSettingEditResponseResultZonesIPV6Value = "off" - ZoneSettingEditResponseResultZonesIPV6ValueOn ZoneSettingEditResponseResultZonesIPV6Value = "on" -) - -// Maximum size of an allowable upload. -type ZoneSettingEditResponseResultZonesMaxUpload struct { - // identifier of the zone setting. - ID ZoneSettingEditResponseResultZonesMaxUploadID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesMaxUploadEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The size depends on the plan level of the - // zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) - Value ZoneSettingEditResponseResultZonesMaxUploadValue `json:"value"` - JSON zoneSettingEditResponseResultZonesMaxUploadJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMaxUploadJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesMaxUpload] -type zoneSettingEditResponseResultZonesMaxUploadJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMaxUpload) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesMaxUpload) implementsZoneSettingEditResponseResult() {} - -// identifier of the zone setting. -type ZoneSettingEditResponseResultZonesMaxUploadID string - -const ( - ZoneSettingEditResponseResultZonesMaxUploadIDMaxUpload ZoneSettingEditResponseResultZonesMaxUploadID = "max_upload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesMaxUploadEditable bool - -const ( - ZoneSettingEditResponseResultZonesMaxUploadEditableTrue ZoneSettingEditResponseResultZonesMaxUploadEditable = true - ZoneSettingEditResponseResultZonesMaxUploadEditableFalse ZoneSettingEditResponseResultZonesMaxUploadEditable = false -) - -// Value of the zone setting. Notes: The size depends on the plan level of the -// zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) -type ZoneSettingEditResponseResultZonesMaxUploadValue float64 - -const ( - ZoneSettingEditResponseResultZonesMaxUploadValue100 ZoneSettingEditResponseResultZonesMaxUploadValue = 100 - ZoneSettingEditResponseResultZonesMaxUploadValue200 ZoneSettingEditResponseResultZonesMaxUploadValue = 200 - ZoneSettingEditResponseResultZonesMaxUploadValue500 ZoneSettingEditResponseResultZonesMaxUploadValue = 500 -) - -// Only accepts HTTPS requests that use at least the TLS protocol version -// specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be -// rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. -type ZoneSettingEditResponseResultZonesMinTLSVersion struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesMinTLSVersionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesMinTLSVersionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesMinTLSVersionValue `json:"value"` - JSON zoneSettingEditResponseResultZonesMinTLSVersionJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMinTLSVersionJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesMinTLSVersion] -type zoneSettingEditResponseResultZonesMinTLSVersionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMinTLSVersion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesMinTLSVersion) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesMinTLSVersionID string - -const ( - ZoneSettingEditResponseResultZonesMinTLSVersionIDMinTLSVersion ZoneSettingEditResponseResultZonesMinTLSVersionID = "min_tls_version" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesMinTLSVersionEditable bool - -const ( - ZoneSettingEditResponseResultZonesMinTLSVersionEditableTrue ZoneSettingEditResponseResultZonesMinTLSVersionEditable = true - ZoneSettingEditResponseResultZonesMinTLSVersionEditableFalse ZoneSettingEditResponseResultZonesMinTLSVersionEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesMinTLSVersionValue string - -const ( - ZoneSettingEditResponseResultZonesMinTLSVersionValue1_0 ZoneSettingEditResponseResultZonesMinTLSVersionValue = "1.0" - ZoneSettingEditResponseResultZonesMinTLSVersionValue1_1 ZoneSettingEditResponseResultZonesMinTLSVersionValue = "1.1" - ZoneSettingEditResponseResultZonesMinTLSVersionValue1_2 ZoneSettingEditResponseResultZonesMinTLSVersionValue = "1.2" - ZoneSettingEditResponseResultZonesMinTLSVersionValue1_3 ZoneSettingEditResponseResultZonesMinTLSVersionValue = "1.3" -) - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -type ZoneSettingEditResponseResultZonesMinify struct { - // Zone setting identifier. - ID ZoneSettingEditResponseResultZonesMinifyID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesMinifyEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesMinifyValue `json:"value"` - JSON zoneSettingEditResponseResultZonesMinifyJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMinifyJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesMinify] -type zoneSettingEditResponseResultZonesMinifyJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMinify) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesMinify) implementsZoneSettingEditResponseResult() {} - -// Zone setting identifier. -type ZoneSettingEditResponseResultZonesMinifyID string - -const ( - ZoneSettingEditResponseResultZonesMinifyIDMinify ZoneSettingEditResponseResultZonesMinifyID = "minify" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesMinifyEditable bool - -const ( - ZoneSettingEditResponseResultZonesMinifyEditableTrue ZoneSettingEditResponseResultZonesMinifyEditable = true - ZoneSettingEditResponseResultZonesMinifyEditableFalse ZoneSettingEditResponseResultZonesMinifyEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesMinifyValue struct { - // Automatically minify all CSS files for your website. - Css ZoneSettingEditResponseResultZonesMinifyValueCss `json:"css"` - // Automatically minify all HTML files for your website. - HTML ZoneSettingEditResponseResultZonesMinifyValueHTML `json:"html"` - // Automatically minify all JavaScript files for your website. - Js ZoneSettingEditResponseResultZonesMinifyValueJs `json:"js"` - JSON zoneSettingEditResponseResultZonesMinifyValueJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMinifyValueJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesMinifyValue] -type zoneSettingEditResponseResultZonesMinifyValueJSON struct { - Css apijson.Field - HTML apijson.Field - Js apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMinifyValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingEditResponseResultZonesMinifyValueCss string - -const ( - ZoneSettingEditResponseResultZonesMinifyValueCssOn ZoneSettingEditResponseResultZonesMinifyValueCss = "on" - ZoneSettingEditResponseResultZonesMinifyValueCssOff ZoneSettingEditResponseResultZonesMinifyValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingEditResponseResultZonesMinifyValueHTML string - -const ( - ZoneSettingEditResponseResultZonesMinifyValueHTMLOn ZoneSettingEditResponseResultZonesMinifyValueHTML = "on" - ZoneSettingEditResponseResultZonesMinifyValueHTMLOff ZoneSettingEditResponseResultZonesMinifyValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingEditResponseResultZonesMinifyValueJs string - -const ( - ZoneSettingEditResponseResultZonesMinifyValueJsOn ZoneSettingEditResponseResultZonesMinifyValueJs = "on" - ZoneSettingEditResponseResultZonesMinifyValueJsOff ZoneSettingEditResponseResultZonesMinifyValueJs = "off" -) - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to -// [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for -// more information. -type ZoneSettingEditResponseResultZonesMirage struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesMirageID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesMirageEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesMirageValue `json:"value"` - JSON zoneSettingEditResponseResultZonesMirageJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMirageJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesMirage] -type zoneSettingEditResponseResultZonesMirageJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMirage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesMirage) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesMirageID string - -const ( - ZoneSettingEditResponseResultZonesMirageIDMirage ZoneSettingEditResponseResultZonesMirageID = "mirage" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesMirageEditable bool - -const ( - ZoneSettingEditResponseResultZonesMirageEditableTrue ZoneSettingEditResponseResultZonesMirageEditable = true - ZoneSettingEditResponseResultZonesMirageEditableFalse ZoneSettingEditResponseResultZonesMirageEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesMirageValue string - -const ( - ZoneSettingEditResponseResultZonesMirageValueOn ZoneSettingEditResponseResultZonesMirageValue = "on" - ZoneSettingEditResponseResultZonesMirageValueOff ZoneSettingEditResponseResultZonesMirageValue = "off" -) - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -type ZoneSettingEditResponseResultZonesMobileRedirect struct { - // Identifier of the zone setting. - ID ZoneSettingEditResponseResultZonesMobileRedirectID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesMobileRedirectEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesMobileRedirectValue `json:"value"` - JSON zoneSettingEditResponseResultZonesMobileRedirectJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMobileRedirectJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesMobileRedirect] -type zoneSettingEditResponseResultZonesMobileRedirectJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMobileRedirect) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesMobileRedirect) implementsZoneSettingEditResponseResult() {} - -// Identifier of the zone setting. -type ZoneSettingEditResponseResultZonesMobileRedirectID string - -const ( - ZoneSettingEditResponseResultZonesMobileRedirectIDMobileRedirect ZoneSettingEditResponseResultZonesMobileRedirectID = "mobile_redirect" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesMobileRedirectEditable bool - -const ( - ZoneSettingEditResponseResultZonesMobileRedirectEditableTrue ZoneSettingEditResponseResultZonesMobileRedirectEditable = true - ZoneSettingEditResponseResultZonesMobileRedirectEditableFalse ZoneSettingEditResponseResultZonesMobileRedirectEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesMobileRedirectValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain string `json:"mobile_subdomain,nullable"` - // Whether or not mobile redirect is enabled. - Status ZoneSettingEditResponseResultZonesMobileRedirectValueStatus `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri bool `json:"strip_uri"` - JSON zoneSettingEditResponseResultZonesMobileRedirectValueJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesMobileRedirectValueJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesMobileRedirectValue] -type zoneSettingEditResponseResultZonesMobileRedirectValueJSON struct { - MobileSubdomain apijson.Field - Status apijson.Field - StripUri apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesMobileRedirectValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingEditResponseResultZonesMobileRedirectValueStatus string - -const ( - ZoneSettingEditResponseResultZonesMobileRedirectValueStatusOn ZoneSettingEditResponseResultZonesMobileRedirectValueStatus = "on" - ZoneSettingEditResponseResultZonesMobileRedirectValueStatusOff ZoneSettingEditResponseResultZonesMobileRedirectValueStatus = "off" -) - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingEditResponseResultZonesNEL struct { - // Zone setting identifier. - ID ZoneSettingEditResponseResultZonesNELID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesNELEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesNELValue `json:"value"` - JSON zoneSettingEditResponseResultZonesNELJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesNELJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesNEL] -type zoneSettingEditResponseResultZonesNELJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesNEL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesNEL) implementsZoneSettingEditResponseResult() {} - -// Zone setting identifier. -type ZoneSettingEditResponseResultZonesNELID string - -const ( - ZoneSettingEditResponseResultZonesNELIDNEL ZoneSettingEditResponseResultZonesNELID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesNELEditable bool - -const ( - ZoneSettingEditResponseResultZonesNELEditableTrue ZoneSettingEditResponseResultZonesNELEditable = true - ZoneSettingEditResponseResultZonesNELEditableFalse ZoneSettingEditResponseResultZonesNELEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesNELValue struct { - Enabled bool `json:"enabled"` - JSON zoneSettingEditResponseResultZonesNELValueJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesNELValueJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesNELValue] -type zoneSettingEditResponseResultZonesNELValueJSON struct { - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesNELValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables the Opportunistic Encryption feature for a zone. -type ZoneSettingEditResponseResultZonesOpportunisticEncryption struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesOpportunisticEncryptionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingEditResponseResultZonesOpportunisticEncryptionValue `json:"value"` - JSON zoneSettingEditResponseResultZonesOpportunisticEncryptionJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesOpportunisticEncryptionJSON contains the JSON -// metadata for the struct -// [ZoneSettingEditResponseResultZonesOpportunisticEncryption] -type zoneSettingEditResponseResultZonesOpportunisticEncryptionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesOpportunisticEncryption) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesOpportunisticEncryption) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesOpportunisticEncryptionID string - -const ( - ZoneSettingEditResponseResultZonesOpportunisticEncryptionIDOpportunisticEncryption ZoneSettingEditResponseResultZonesOpportunisticEncryptionID = "opportunistic_encryption" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditable bool - -const ( - ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditableTrue ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditable = true - ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditableFalse ZoneSettingEditResponseResultZonesOpportunisticEncryptionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditResponseResultZonesOpportunisticEncryptionValue string - -const ( - ZoneSettingEditResponseResultZonesOpportunisticEncryptionValueOn ZoneSettingEditResponseResultZonesOpportunisticEncryptionValue = "on" - ZoneSettingEditResponseResultZonesOpportunisticEncryptionValueOff ZoneSettingEditResponseResultZonesOpportunisticEncryptionValue = "off" -) - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -type ZoneSettingEditResponseResultZonesOpportunisticOnion struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesOpportunisticOnionID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesOpportunisticOnionEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingEditResponseResultZonesOpportunisticOnionValue `json:"value"` - JSON zoneSettingEditResponseResultZonesOpportunisticOnionJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesOpportunisticOnionJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesOpportunisticOnion] -type zoneSettingEditResponseResultZonesOpportunisticOnionJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesOpportunisticOnion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesOpportunisticOnion) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesOpportunisticOnionID string - -const ( - ZoneSettingEditResponseResultZonesOpportunisticOnionIDOpportunisticOnion ZoneSettingEditResponseResultZonesOpportunisticOnionID = "opportunistic_onion" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesOpportunisticOnionEditable bool - -const ( - ZoneSettingEditResponseResultZonesOpportunisticOnionEditableTrue ZoneSettingEditResponseResultZonesOpportunisticOnionEditable = true - ZoneSettingEditResponseResultZonesOpportunisticOnionEditableFalse ZoneSettingEditResponseResultZonesOpportunisticOnionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditResponseResultZonesOpportunisticOnionValue string - -const ( - ZoneSettingEditResponseResultZonesOpportunisticOnionValueOn ZoneSettingEditResponseResultZonesOpportunisticOnionValue = "on" - ZoneSettingEditResponseResultZonesOpportunisticOnionValueOff ZoneSettingEditResponseResultZonesOpportunisticOnionValue = "off" -) - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingEditResponseResultZonesOrangeToOrange struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesOrangeToOrangeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesOrangeToOrangeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesOrangeToOrangeValue `json:"value"` - JSON zoneSettingEditResponseResultZonesOrangeToOrangeJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesOrangeToOrangeJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesOrangeToOrange] -type zoneSettingEditResponseResultZonesOrangeToOrangeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesOrangeToOrange) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesOrangeToOrange) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesOrangeToOrangeID string - -const ( - ZoneSettingEditResponseResultZonesOrangeToOrangeIDOrangeToOrange ZoneSettingEditResponseResultZonesOrangeToOrangeID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesOrangeToOrangeEditable bool - -const ( - ZoneSettingEditResponseResultZonesOrangeToOrangeEditableTrue ZoneSettingEditResponseResultZonesOrangeToOrangeEditable = true - ZoneSettingEditResponseResultZonesOrangeToOrangeEditableFalse ZoneSettingEditResponseResultZonesOrangeToOrangeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesOrangeToOrangeValue string - -const ( - ZoneSettingEditResponseResultZonesOrangeToOrangeValueOn ZoneSettingEditResponseResultZonesOrangeToOrangeValue = "on" - ZoneSettingEditResponseResultZonesOrangeToOrangeValueOff ZoneSettingEditResponseResultZonesOrangeToOrangeValue = "off" -) - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -type ZoneSettingEditResponseResultZonesOriginErrorPagePassThru struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesOriginErrorPagePassThruID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValue `json:"value"` - JSON zoneSettingEditResponseResultZonesOriginErrorPagePassThruJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesOriginErrorPagePassThruJSON contains the JSON -// metadata for the struct -// [ZoneSettingEditResponseResultZonesOriginErrorPagePassThru] -type zoneSettingEditResponseResultZonesOriginErrorPagePassThruJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesOriginErrorPagePassThru) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesOriginErrorPagePassThru) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesOriginErrorPagePassThruID string - -const ( - ZoneSettingEditResponseResultZonesOriginErrorPagePassThruIDOriginErrorPagePassThru ZoneSettingEditResponseResultZonesOriginErrorPagePassThruID = "origin_error_page_pass_thru" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditable bool - -const ( - ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditableTrue ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditable = true - ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditableFalse ZoneSettingEditResponseResultZonesOriginErrorPagePassThruEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValue string - -const ( - ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValueOn ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValue = "on" - ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValueOff ZoneSettingEditResponseResultZonesOriginErrorPagePassThruValue = "off" -) - -type ZoneSettingEditResponseResultZonesOriginMaxHTTPVersion struct { - // Identifier of the zone setting. - ID ZoneSettingEditResponseResultZonesOriginMaxHTTPVersionID `json:"id,required"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - JSON zoneSettingEditResponseResultZonesOriginMaxHTTPVersionJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesOriginMaxHTTPVersionJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesOriginMaxHTTPVersion] -type zoneSettingEditResponseResultZonesOriginMaxHTTPVersionJSON struct { - ID apijson.Field - ModifiedOn apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesOriginMaxHTTPVersion) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesOriginMaxHTTPVersion) implementsZoneSettingEditResponseResult() { -} - -// Identifier of the zone setting. -type ZoneSettingEditResponseResultZonesOriginMaxHTTPVersionID string - -const ( - ZoneSettingEditResponseResultZonesOriginMaxHTTPVersionIDOriginMaxHTTPVersion ZoneSettingEditResponseResultZonesOriginMaxHTTPVersionID = "origin_max_http_version" -) - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingEditResponseResultZonesPolish struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesPolishID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesPolishEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesPolishValue `json:"value"` - JSON zoneSettingEditResponseResultZonesPolishJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesPolishJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesPolish] -type zoneSettingEditResponseResultZonesPolishJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesPolish) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesPolish) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesPolishID string - -const ( - ZoneSettingEditResponseResultZonesPolishIDPolish ZoneSettingEditResponseResultZonesPolishID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesPolishEditable bool - -const ( - ZoneSettingEditResponseResultZonesPolishEditableTrue ZoneSettingEditResponseResultZonesPolishEditable = true - ZoneSettingEditResponseResultZonesPolishEditableFalse ZoneSettingEditResponseResultZonesPolishEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesPolishValue string - -const ( - ZoneSettingEditResponseResultZonesPolishValueOff ZoneSettingEditResponseResultZonesPolishValue = "off" - ZoneSettingEditResponseResultZonesPolishValueLossless ZoneSettingEditResponseResultZonesPolishValue = "lossless" - ZoneSettingEditResponseResultZonesPolishValueLossy ZoneSettingEditResponseResultZonesPolishValue = "lossy" -) - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -type ZoneSettingEditResponseResultZonesPrefetchPreload struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesPrefetchPreloadID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesPrefetchPreloadEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesPrefetchPreloadValue `json:"value"` - JSON zoneSettingEditResponseResultZonesPrefetchPreloadJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesPrefetchPreloadJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesPrefetchPreload] -type zoneSettingEditResponseResultZonesPrefetchPreloadJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesPrefetchPreload) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesPrefetchPreload) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesPrefetchPreloadID string - -const ( - ZoneSettingEditResponseResultZonesPrefetchPreloadIDPrefetchPreload ZoneSettingEditResponseResultZonesPrefetchPreloadID = "prefetch_preload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesPrefetchPreloadEditable bool - -const ( - ZoneSettingEditResponseResultZonesPrefetchPreloadEditableTrue ZoneSettingEditResponseResultZonesPrefetchPreloadEditable = true - ZoneSettingEditResponseResultZonesPrefetchPreloadEditableFalse ZoneSettingEditResponseResultZonesPrefetchPreloadEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesPrefetchPreloadValue string - -const ( - ZoneSettingEditResponseResultZonesPrefetchPreloadValueOn ZoneSettingEditResponseResultZonesPrefetchPreloadValue = "on" - ZoneSettingEditResponseResultZonesPrefetchPreloadValueOff ZoneSettingEditResponseResultZonesPrefetchPreloadValue = "off" -) - -// Maximum time between two read operations from origin. -type ZoneSettingEditResponseResultZonesProxyReadTimeout struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesProxyReadTimeoutID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesProxyReadTimeoutEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value float64 `json:"value"` - JSON zoneSettingEditResponseResultZonesProxyReadTimeoutJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesProxyReadTimeoutJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesProxyReadTimeout] -type zoneSettingEditResponseResultZonesProxyReadTimeoutJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesProxyReadTimeout) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesProxyReadTimeout) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesProxyReadTimeoutID string - -const ( - ZoneSettingEditResponseResultZonesProxyReadTimeoutIDProxyReadTimeout ZoneSettingEditResponseResultZonesProxyReadTimeoutID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesProxyReadTimeoutEditable bool - -const ( - ZoneSettingEditResponseResultZonesProxyReadTimeoutEditableTrue ZoneSettingEditResponseResultZonesProxyReadTimeoutEditable = true - ZoneSettingEditResponseResultZonesProxyReadTimeoutEditableFalse ZoneSettingEditResponseResultZonesProxyReadTimeoutEditable = false -) - -// The value set for the Pseudo IPv4 setting. -type ZoneSettingEditResponseResultZonesPseudoIpv4 struct { - // Value of the Pseudo IPv4 setting. - ID ZoneSettingEditResponseResultZonesPseudoIpv4ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesPseudoIpv4Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the Pseudo IPv4 setting. - Value ZoneSettingEditResponseResultZonesPseudoIpv4Value `json:"value"` - JSON zoneSettingEditResponseResultZonesPseudoIpv4JSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesPseudoIpv4JSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesPseudoIpv4] -type zoneSettingEditResponseResultZonesPseudoIpv4JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesPseudoIpv4) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesPseudoIpv4) implementsZoneSettingEditResponseResult() {} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingEditResponseResultZonesPseudoIpv4ID string - -const ( - ZoneSettingEditResponseResultZonesPseudoIpv4IDPseudoIpv4 ZoneSettingEditResponseResultZonesPseudoIpv4ID = "pseudo_ipv4" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesPseudoIpv4Editable bool - -const ( - ZoneSettingEditResponseResultZonesPseudoIpv4EditableTrue ZoneSettingEditResponseResultZonesPseudoIpv4Editable = true - ZoneSettingEditResponseResultZonesPseudoIpv4EditableFalse ZoneSettingEditResponseResultZonesPseudoIpv4Editable = false -) - -// Value of the Pseudo IPv4 setting. -type ZoneSettingEditResponseResultZonesPseudoIpv4Value string - -const ( - ZoneSettingEditResponseResultZonesPseudoIpv4ValueOff ZoneSettingEditResponseResultZonesPseudoIpv4Value = "off" - ZoneSettingEditResponseResultZonesPseudoIpv4ValueAddHeader ZoneSettingEditResponseResultZonesPseudoIpv4Value = "add_header" - ZoneSettingEditResponseResultZonesPseudoIpv4ValueOverwriteHeader ZoneSettingEditResponseResultZonesPseudoIpv4Value = "overwrite_header" -) - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -type ZoneSettingEditResponseResultZonesResponseBuffering struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesResponseBufferingID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesResponseBufferingEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesResponseBufferingValue `json:"value"` - JSON zoneSettingEditResponseResultZonesResponseBufferingJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesResponseBufferingJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesResponseBuffering] -type zoneSettingEditResponseResultZonesResponseBufferingJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesResponseBuffering) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesResponseBuffering) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesResponseBufferingID string - -const ( - ZoneSettingEditResponseResultZonesResponseBufferingIDResponseBuffering ZoneSettingEditResponseResultZonesResponseBufferingID = "response_buffering" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesResponseBufferingEditable bool - -const ( - ZoneSettingEditResponseResultZonesResponseBufferingEditableTrue ZoneSettingEditResponseResultZonesResponseBufferingEditable = true - ZoneSettingEditResponseResultZonesResponseBufferingEditableFalse ZoneSettingEditResponseResultZonesResponseBufferingEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesResponseBufferingValue string - -const ( - ZoneSettingEditResponseResultZonesResponseBufferingValueOn ZoneSettingEditResponseResultZonesResponseBufferingValue = "on" - ZoneSettingEditResponseResultZonesResponseBufferingValueOff ZoneSettingEditResponseResultZonesResponseBufferingValue = "off" -) - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingEditResponseResultZonesRocketLoader struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesRocketLoaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesRocketLoaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesRocketLoaderValue `json:"value"` - JSON zoneSettingEditResponseResultZonesRocketLoaderJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesRocketLoaderJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesRocketLoader] -type zoneSettingEditResponseResultZonesRocketLoaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesRocketLoader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesRocketLoader) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesRocketLoaderID string - -const ( - ZoneSettingEditResponseResultZonesRocketLoaderIDRocketLoader ZoneSettingEditResponseResultZonesRocketLoaderID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesRocketLoaderEditable bool - -const ( - ZoneSettingEditResponseResultZonesRocketLoaderEditableTrue ZoneSettingEditResponseResultZonesRocketLoaderEditable = true - ZoneSettingEditResponseResultZonesRocketLoaderEditableFalse ZoneSettingEditResponseResultZonesRocketLoaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesRocketLoaderValue string - -const ( - ZoneSettingEditResponseResultZonesRocketLoaderValueOn ZoneSettingEditResponseResultZonesRocketLoaderValue = "on" - ZoneSettingEditResponseResultZonesRocketLoaderValueOff ZoneSettingEditResponseResultZonesRocketLoaderValue = "off" -) - -// [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) -// serves your WordPress site from Cloudflare's edge network and caches third-party -// fonts. -type ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimization struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationJSON -// contains the JSON metadata for the struct -// [ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimization] -type zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimization) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationID string - -const ( - ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationIDAutomaticPlatformOptimization ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationID = "automatic_platform_optimization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditable bool - -const ( - ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditableTrue ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditable = true - ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditableFalse ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationEditable = false -) - -type ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValue struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType bool `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf bool `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled bool `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames []string `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress bool `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin bool `json:"wp_plugin,required"` - JSON zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON -// contains the JSON metadata for the struct -// [ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValue] -type zoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValueJSON struct { - CacheByDeviceType apijson.Field - Cf apijson.Field - Enabled apijson.Field - Hostnames apijson.Field - Wordpress apijson.Field - WpPlugin apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSchemasAutomaticPlatformOptimizationValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare security header for a zone. -type ZoneSettingEditResponseResultZonesSecurityHeader struct { - // ID of the zone's security header. - ID ZoneSettingEditResponseResultZonesSecurityHeaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSecurityHeaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingEditResponseResultZonesSecurityHeaderValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSecurityHeaderJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSecurityHeaderJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesSecurityHeader] -type zoneSettingEditResponseResultZonesSecurityHeaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSecurityHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSecurityHeader) implementsZoneSettingEditResponseResult() {} - -// ID of the zone's security header. -type ZoneSettingEditResponseResultZonesSecurityHeaderID string - -const ( - ZoneSettingEditResponseResultZonesSecurityHeaderIDSecurityHeader ZoneSettingEditResponseResultZonesSecurityHeaderID = "security_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSecurityHeaderEditable bool - -const ( - ZoneSettingEditResponseResultZonesSecurityHeaderEditableTrue ZoneSettingEditResponseResultZonesSecurityHeaderEditable = true - ZoneSettingEditResponseResultZonesSecurityHeaderEditableFalse ZoneSettingEditResponseResultZonesSecurityHeaderEditable = false -) - -type ZoneSettingEditResponseResultZonesSecurityHeaderValue struct { - // Strict Transport Security. - StrictTransportSecurity ZoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurity `json:"strict_transport_security"` - JSON zoneSettingEditResponseResultZonesSecurityHeaderValueJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSecurityHeaderValueJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesSecurityHeaderValue] -type zoneSettingEditResponseResultZonesSecurityHeaderValueJSON struct { - StrictTransportSecurity apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSecurityHeaderValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Strict Transport Security. -type ZoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled bool `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains bool `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge float64 `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff bool `json:"nosniff"` - JSON zoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON -// contains the JSON metadata for the struct -// [ZoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurity] -type zoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurityJSON struct { - Enabled apijson.Field - IncludeSubdomains apijson.Field - MaxAge apijson.Field - Nosniff apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSecurityHeaderValueStrictTransportSecurity) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -type ZoneSettingEditResponseResultZonesSecurityLevel struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesSecurityLevelID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSecurityLevelEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesSecurityLevelValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSecurityLevelJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSecurityLevelJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesSecurityLevel] -type zoneSettingEditResponseResultZonesSecurityLevelJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSecurityLevel) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSecurityLevel) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesSecurityLevelID string - -const ( - ZoneSettingEditResponseResultZonesSecurityLevelIDSecurityLevel ZoneSettingEditResponseResultZonesSecurityLevelID = "security_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSecurityLevelEditable bool - -const ( - ZoneSettingEditResponseResultZonesSecurityLevelEditableTrue ZoneSettingEditResponseResultZonesSecurityLevelEditable = true - ZoneSettingEditResponseResultZonesSecurityLevelEditableFalse ZoneSettingEditResponseResultZonesSecurityLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesSecurityLevelValue string - -const ( - ZoneSettingEditResponseResultZonesSecurityLevelValueOff ZoneSettingEditResponseResultZonesSecurityLevelValue = "off" - ZoneSettingEditResponseResultZonesSecurityLevelValueEssentiallyOff ZoneSettingEditResponseResultZonesSecurityLevelValue = "essentially_off" - ZoneSettingEditResponseResultZonesSecurityLevelValueLow ZoneSettingEditResponseResultZonesSecurityLevelValue = "low" - ZoneSettingEditResponseResultZonesSecurityLevelValueMedium ZoneSettingEditResponseResultZonesSecurityLevelValue = "medium" - ZoneSettingEditResponseResultZonesSecurityLevelValueHigh ZoneSettingEditResponseResultZonesSecurityLevelValue = "high" - ZoneSettingEditResponseResultZonesSecurityLevelValueUnderAttack ZoneSettingEditResponseResultZonesSecurityLevelValue = "under_attack" -) - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -type ZoneSettingEditResponseResultZonesServerSideExclude struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesServerSideExcludeID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesServerSideExcludeEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesServerSideExcludeValue `json:"value"` - JSON zoneSettingEditResponseResultZonesServerSideExcludeJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesServerSideExcludeJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesServerSideExclude] -type zoneSettingEditResponseResultZonesServerSideExcludeJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesServerSideExclude) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesServerSideExclude) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesServerSideExcludeID string - -const ( - ZoneSettingEditResponseResultZonesServerSideExcludeIDServerSideExclude ZoneSettingEditResponseResultZonesServerSideExcludeID = "server_side_exclude" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesServerSideExcludeEditable bool - -const ( - ZoneSettingEditResponseResultZonesServerSideExcludeEditableTrue ZoneSettingEditResponseResultZonesServerSideExcludeEditable = true - ZoneSettingEditResponseResultZonesServerSideExcludeEditableFalse ZoneSettingEditResponseResultZonesServerSideExcludeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesServerSideExcludeValue string - -const ( - ZoneSettingEditResponseResultZonesServerSideExcludeValueOn ZoneSettingEditResponseResultZonesServerSideExcludeValue = "on" - ZoneSettingEditResponseResultZonesServerSideExcludeValueOff ZoneSettingEditResponseResultZonesServerSideExcludeValue = "off" -) - -// Allow SHA1 support. -type ZoneSettingEditResponseResultZonesSha1Support struct { - // Zone setting identifier. - ID ZoneSettingEditResponseResultZonesSha1SupportID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSha1SupportEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesSha1SupportValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSha1SupportJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSha1SupportJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesSha1Support] -type zoneSettingEditResponseResultZonesSha1SupportJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSha1Support) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSha1Support) implementsZoneSettingEditResponseResult() {} - -// Zone setting identifier. -type ZoneSettingEditResponseResultZonesSha1SupportID string - -const ( - ZoneSettingEditResponseResultZonesSha1SupportIDSha1Support ZoneSettingEditResponseResultZonesSha1SupportID = "sha1_support" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSha1SupportEditable bool - -const ( - ZoneSettingEditResponseResultZonesSha1SupportEditableTrue ZoneSettingEditResponseResultZonesSha1SupportEditable = true - ZoneSettingEditResponseResultZonesSha1SupportEditableFalse ZoneSettingEditResponseResultZonesSha1SupportEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesSha1SupportValue string - -const ( - ZoneSettingEditResponseResultZonesSha1SupportValueOff ZoneSettingEditResponseResultZonesSha1SupportValue = "off" - ZoneSettingEditResponseResultZonesSha1SupportValueOn ZoneSettingEditResponseResultZonesSha1SupportValue = "on" -) - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -type ZoneSettingEditResponseResultZonesSortQueryStringForCache struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesSortQueryStringForCacheID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesSortQueryStringForCacheValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSortQueryStringForCacheJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSortQueryStringForCacheJSON contains the JSON -// metadata for the struct -// [ZoneSettingEditResponseResultZonesSortQueryStringForCache] -type zoneSettingEditResponseResultZonesSortQueryStringForCacheJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSortQueryStringForCache) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSortQueryStringForCache) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesSortQueryStringForCacheID string - -const ( - ZoneSettingEditResponseResultZonesSortQueryStringForCacheIDSortQueryStringForCache ZoneSettingEditResponseResultZonesSortQueryStringForCacheID = "sort_query_string_for_cache" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditable bool - -const ( - ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditableTrue ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditable = true - ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditableFalse ZoneSettingEditResponseResultZonesSortQueryStringForCacheEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesSortQueryStringForCacheValue string - -const ( - ZoneSettingEditResponseResultZonesSortQueryStringForCacheValueOn ZoneSettingEditResponseResultZonesSortQueryStringForCacheValue = "on" - ZoneSettingEditResponseResultZonesSortQueryStringForCacheValueOff ZoneSettingEditResponseResultZonesSortQueryStringForCacheValue = "off" -) - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -type ZoneSettingEditResponseResultZonesSSL struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesSSLID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesSSLEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Depends on the zone's plan level - Value ZoneSettingEditResponseResultZonesSSLValue `json:"value"` - JSON zoneSettingEditResponseResultZonesSSLJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSSLJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesSSL] -type zoneSettingEditResponseResultZonesSSLJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSSL) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSSL) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesSSLID string - -const ( - ZoneSettingEditResponseResultZonesSSLIDSSL ZoneSettingEditResponseResultZonesSSLID = "ssl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesSSLEditable bool - -const ( - ZoneSettingEditResponseResultZonesSSLEditableTrue ZoneSettingEditResponseResultZonesSSLEditable = true - ZoneSettingEditResponseResultZonesSSLEditableFalse ZoneSettingEditResponseResultZonesSSLEditable = false -) - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingEditResponseResultZonesSSLValue string - -const ( - ZoneSettingEditResponseResultZonesSSLValueOff ZoneSettingEditResponseResultZonesSSLValue = "off" - ZoneSettingEditResponseResultZonesSSLValueFlexible ZoneSettingEditResponseResultZonesSSLValue = "flexible" - ZoneSettingEditResponseResultZonesSSLValueFull ZoneSettingEditResponseResultZonesSSLValue = "full" - ZoneSettingEditResponseResultZonesSSLValueStrict ZoneSettingEditResponseResultZonesSSLValue = "strict" -) - -type ZoneSettingEditResponseResultZonesSSLRecommender struct { - // Enrollment value for SSL/TLS Recommender. - ID ZoneSettingEditResponseResultZonesSSLRecommenderID `json:"id"` - // ssl-recommender enrollment setting. - Enabled bool `json:"enabled"` - JSON zoneSettingEditResponseResultZonesSSLRecommenderJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesSSLRecommenderJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesSSLRecommender] -type zoneSettingEditResponseResultZonesSSLRecommenderJSON struct { - ID apijson.Field - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesSSLRecommender) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesSSLRecommender) implementsZoneSettingEditResponseResult() {} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingEditResponseResultZonesSSLRecommenderID string - -const ( - ZoneSettingEditResponseResultZonesSSLRecommenderIDSSLRecommender ZoneSettingEditResponseResultZonesSSLRecommenderID = "ssl_recommender" -) - -// Only allows TLS1.2. -type ZoneSettingEditResponseResultZonesTLS1_2Only struct { - // Zone setting identifier. - ID ZoneSettingEditResponseResultZonesTLS1_2OnlyID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesTLS1_2OnlyEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesTLS1_2OnlyValue `json:"value"` - JSON zoneSettingEditResponseResultZonesTls1_2OnlyJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesTls1_2OnlyJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesTLS1_2Only] -type zoneSettingEditResponseResultZonesTls1_2OnlyJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesTLS1_2Only) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesTLS1_2Only) implementsZoneSettingEditResponseResult() {} - -// Zone setting identifier. -type ZoneSettingEditResponseResultZonesTLS1_2OnlyID string - -const ( - ZoneSettingEditResponseResultZonesTLS1_2OnlyIDTLS1_2Only ZoneSettingEditResponseResultZonesTLS1_2OnlyID = "tls_1_2_only" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesTLS1_2OnlyEditable bool - -const ( - ZoneSettingEditResponseResultZonesTLS1_2OnlyEditableTrue ZoneSettingEditResponseResultZonesTLS1_2OnlyEditable = true - ZoneSettingEditResponseResultZonesTLS1_2OnlyEditableFalse ZoneSettingEditResponseResultZonesTLS1_2OnlyEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesTLS1_2OnlyValue string - -const ( - ZoneSettingEditResponseResultZonesTLS1_2OnlyValueOff ZoneSettingEditResponseResultZonesTLS1_2OnlyValue = "off" - ZoneSettingEditResponseResultZonesTLS1_2OnlyValueOn ZoneSettingEditResponseResultZonesTLS1_2OnlyValue = "on" -) - -// Enables Crypto TLS 1.3 feature for a zone. -type ZoneSettingEditResponseResultZonesTLS1_3 struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesTLS1_3ID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesTLS1_3Editable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingEditResponseResultZonesTLS1_3Value `json:"value"` - JSON zoneSettingEditResponseResultZonesTls1_3JSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesTls1_3JSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesTLS1_3] -type zoneSettingEditResponseResultZonesTls1_3JSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesTLS1_3) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesTLS1_3) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesTLS1_3ID string - -const ( - ZoneSettingEditResponseResultZonesTLS1_3IDTLS1_3 ZoneSettingEditResponseResultZonesTLS1_3ID = "tls_1_3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesTLS1_3Editable bool - -const ( - ZoneSettingEditResponseResultZonesTLS1_3EditableTrue ZoneSettingEditResponseResultZonesTLS1_3Editable = true - ZoneSettingEditResponseResultZonesTLS1_3EditableFalse ZoneSettingEditResponseResultZonesTLS1_3Editable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditResponseResultZonesTLS1_3Value string - -const ( - ZoneSettingEditResponseResultZonesTLS1_3ValueOn ZoneSettingEditResponseResultZonesTLS1_3Value = "on" - ZoneSettingEditResponseResultZonesTLS1_3ValueOff ZoneSettingEditResponseResultZonesTLS1_3Value = "off" - ZoneSettingEditResponseResultZonesTLS1_3ValueZrt ZoneSettingEditResponseResultZonesTLS1_3Value = "zrt" -) - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -type ZoneSettingEditResponseResultZonesTLSClientAuth struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesTLSClientAuthID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesTLSClientAuthEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // value of the zone setting. - Value ZoneSettingEditResponseResultZonesTLSClientAuthValue `json:"value"` - JSON zoneSettingEditResponseResultZonesTLSClientAuthJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesTLSClientAuthJSON contains the JSON metadata -// for the struct [ZoneSettingEditResponseResultZonesTLSClientAuth] -type zoneSettingEditResponseResultZonesTLSClientAuthJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesTLSClientAuth) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesTLSClientAuth) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesTLSClientAuthID string - -const ( - ZoneSettingEditResponseResultZonesTLSClientAuthIDTLSClientAuth ZoneSettingEditResponseResultZonesTLSClientAuthID = "tls_client_auth" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesTLSClientAuthEditable bool - -const ( - ZoneSettingEditResponseResultZonesTLSClientAuthEditableTrue ZoneSettingEditResponseResultZonesTLSClientAuthEditable = true - ZoneSettingEditResponseResultZonesTLSClientAuthEditableFalse ZoneSettingEditResponseResultZonesTLSClientAuthEditable = false -) - -// value of the zone setting. -type ZoneSettingEditResponseResultZonesTLSClientAuthValue string - -const ( - ZoneSettingEditResponseResultZonesTLSClientAuthValueOn ZoneSettingEditResponseResultZonesTLSClientAuthValue = "on" - ZoneSettingEditResponseResultZonesTLSClientAuthValueOff ZoneSettingEditResponseResultZonesTLSClientAuthValue = "off" -) - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -type ZoneSettingEditResponseResultZonesTrueClientIPHeader struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesTrueClientIPHeaderID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesTrueClientIPHeaderValue `json:"value"` - JSON zoneSettingEditResponseResultZonesTrueClientIPHeaderJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesTrueClientIPHeaderJSON contains the JSON -// metadata for the struct [ZoneSettingEditResponseResultZonesTrueClientIPHeader] -type zoneSettingEditResponseResultZonesTrueClientIPHeaderJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesTrueClientIPHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesTrueClientIPHeader) implementsZoneSettingEditResponseResult() { -} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesTrueClientIPHeaderID string - -const ( - ZoneSettingEditResponseResultZonesTrueClientIPHeaderIDTrueClientIPHeader ZoneSettingEditResponseResultZonesTrueClientIPHeaderID = "true_client_ip_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditable bool - -const ( - ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditableTrue ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditable = true - ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditableFalse ZoneSettingEditResponseResultZonesTrueClientIPHeaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesTrueClientIPHeaderValue string - -const ( - ZoneSettingEditResponseResultZonesTrueClientIPHeaderValueOn ZoneSettingEditResponseResultZonesTrueClientIPHeaderValue = "on" - ZoneSettingEditResponseResultZonesTrueClientIPHeaderValueOff ZoneSettingEditResponseResultZonesTrueClientIPHeaderValue = "off" -) - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -type ZoneSettingEditResponseResultZonesWAF struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesWAFID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesWAFEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesWAFValue `json:"value"` - JSON zoneSettingEditResponseResultZonesWAFJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesWAFJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesWAF] -type zoneSettingEditResponseResultZonesWAFJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesWAF) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesWAF) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesWAFID string - -const ( - ZoneSettingEditResponseResultZonesWAFIDWAF ZoneSettingEditResponseResultZonesWAFID = "waf" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesWAFEditable bool - -const ( - ZoneSettingEditResponseResultZonesWAFEditableTrue ZoneSettingEditResponseResultZonesWAFEditable = true - ZoneSettingEditResponseResultZonesWAFEditableFalse ZoneSettingEditResponseResultZonesWAFEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesWAFValue string - -const ( - ZoneSettingEditResponseResultZonesWAFValueOn ZoneSettingEditResponseResultZonesWAFValue = "on" - ZoneSettingEditResponseResultZonesWAFValueOff ZoneSettingEditResponseResultZonesWAFValue = "off" -) - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -type ZoneSettingEditResponseResultZonesWebp struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesWebpID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesWebpEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesWebpValue `json:"value"` - JSON zoneSettingEditResponseResultZonesWebpJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesWebpJSON contains the JSON metadata for the -// struct [ZoneSettingEditResponseResultZonesWebp] -type zoneSettingEditResponseResultZonesWebpJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesWebp) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesWebp) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesWebpID string - -const ( - ZoneSettingEditResponseResultZonesWebpIDWebp ZoneSettingEditResponseResultZonesWebpID = "webp" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesWebpEditable bool - -const ( - ZoneSettingEditResponseResultZonesWebpEditableTrue ZoneSettingEditResponseResultZonesWebpEditable = true - ZoneSettingEditResponseResultZonesWebpEditableFalse ZoneSettingEditResponseResultZonesWebpEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesWebpValue string - -const ( - ZoneSettingEditResponseResultZonesWebpValueOff ZoneSettingEditResponseResultZonesWebpValue = "off" - ZoneSettingEditResponseResultZonesWebpValueOn ZoneSettingEditResponseResultZonesWebpValue = "on" -) - -// WebSockets are open connections sustained between the client and the origin -// server. Inside a WebSockets connection, the client and the origin can pass data -// back and forth without having to reestablish sessions. This makes exchanging -// data within a WebSockets connection fast. WebSockets are often used for -// real-time applications such as live chat and gaming. For more information refer -// to -// [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). -type ZoneSettingEditResponseResultZonesWebsockets struct { - // ID of the zone setting. - ID ZoneSettingEditResponseResultZonesWebsocketsID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEditResponseResultZonesWebsocketsEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEditResponseResultZonesWebsocketsValue `json:"value"` - JSON zoneSettingEditResponseResultZonesWebsocketsJSON `json:"-"` -} - -// zoneSettingEditResponseResultZonesWebsocketsJSON contains the JSON metadata for -// the struct [ZoneSettingEditResponseResultZonesWebsockets] -type zoneSettingEditResponseResultZonesWebsocketsJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEditResponseResultZonesWebsockets) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ZoneSettingEditResponseResultZonesWebsockets) implementsZoneSettingEditResponseResult() {} - -// ID of the zone setting. -type ZoneSettingEditResponseResultZonesWebsocketsID string - -const ( - ZoneSettingEditResponseResultZonesWebsocketsIDWebsockets ZoneSettingEditResponseResultZonesWebsocketsID = "websockets" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditResponseResultZonesWebsocketsEditable bool - -const ( - ZoneSettingEditResponseResultZonesWebsocketsEditableTrue ZoneSettingEditResponseResultZonesWebsocketsEditable = true - ZoneSettingEditResponseResultZonesWebsocketsEditableFalse ZoneSettingEditResponseResultZonesWebsocketsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditResponseResultZonesWebsocketsValue string - -const ( - ZoneSettingEditResponseResultZonesWebsocketsValueOff ZoneSettingEditResponseResultZonesWebsocketsValue = "off" - ZoneSettingEditResponseResultZonesWebsocketsValueOn ZoneSettingEditResponseResultZonesWebsocketsValue = "on" -) - -type ZoneSettingEditParams struct { - // One or more zone setting objects. Must contain an ID and a value. - Items param.Field[[]ZoneSettingEditParamsItem] `json:"items,required"` -} - -func (r ZoneSettingEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// 0-RTT session resumption enabled for this zone. -// -// Satisfied by [ZoneSettingEditParamsItemsZones0rtt], -// [ZoneSettingEditParamsItemsZonesAdvancedDDOS], -// [ZoneSettingEditParamsItemsZonesAlwaysOnline], -// [ZoneSettingEditParamsItemsZonesAlwaysUseHTTPs], -// [ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewrites], -// [ZoneSettingEditParamsItemsZonesBrotli], -// [ZoneSettingEditParamsItemsZonesBrowserCacheTTL], -// [ZoneSettingEditParamsItemsZonesBrowserCheck], -// [ZoneSettingEditParamsItemsZonesCacheLevel], -// [ZoneSettingEditParamsItemsZonesChallengeTTL], -// [ZoneSettingEditParamsItemsZonesCiphers], -// [ZoneSettingEditParamsItemsZonesCnameFlattening], -// [ZoneSettingEditParamsItemsZonesDevelopmentMode], -// [ZoneSettingEditParamsItemsZonesEarlyHints], -// [ZoneSettingEditParamsItemsZonesEdgeCacheTTL], -// [ZoneSettingEditParamsItemsZonesEmailObfuscation], -// [ZoneSettingEditParamsItemsZonesH2Prioritization], -// [ZoneSettingEditParamsItemsZonesHotlinkProtection], -// [ZoneSettingEditParamsItemsZonesHTTP2], [ZoneSettingEditParamsItemsZonesHTTP3], -// [ZoneSettingEditParamsItemsZonesImageResizing], -// [ZoneSettingEditParamsItemsZonesIPGeolocation], -// [ZoneSettingEditParamsItemsZonesIPV6], -// [ZoneSettingEditParamsItemsZonesMaxUpload], -// [ZoneSettingEditParamsItemsZonesMinTLSVersion], -// [ZoneSettingEditParamsItemsZonesMinify], -// [ZoneSettingEditParamsItemsZonesMirage], -// [ZoneSettingEditParamsItemsZonesMobileRedirect], -// [ZoneSettingEditParamsItemsZonesNEL], -// [ZoneSettingEditParamsItemsZonesOpportunisticEncryption], -// [ZoneSettingEditParamsItemsZonesOpportunisticOnion], -// [ZoneSettingEditParamsItemsZonesOrangeToOrange], -// [ZoneSettingEditParamsItemsZonesOriginErrorPagePassThru], -// [ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersion], -// [ZoneSettingEditParamsItemsZonesPolish], -// [ZoneSettingEditParamsItemsZonesPrefetchPreload], -// [ZoneSettingEditParamsItemsZonesProxyReadTimeout], -// [ZoneSettingEditParamsItemsZonesPseudoIpv4], -// [ZoneSettingEditParamsItemsZonesResponseBuffering], -// [ZoneSettingEditParamsItemsZonesRocketLoader], -// [ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimization], -// [ZoneSettingEditParamsItemsZonesSecurityHeader], -// [ZoneSettingEditParamsItemsZonesSecurityLevel], -// [ZoneSettingEditParamsItemsZonesServerSideExclude], -// [ZoneSettingEditParamsItemsZonesSha1Support], -// [ZoneSettingEditParamsItemsZonesSortQueryStringForCache], -// [ZoneSettingEditParamsItemsZonesSSL], -// [ZoneSettingEditParamsItemsZonesSSLRecommender], -// [ZoneSettingEditParamsItemsZonesTLS1_2Only], -// [ZoneSettingEditParamsItemsZonesTLS1_3], -// [ZoneSettingEditParamsItemsZonesTLSClientAuth], -// [ZoneSettingEditParamsItemsZonesTrueClientIPHeader], -// [ZoneSettingEditParamsItemsZonesWAF], [ZoneSettingEditParamsItemsZonesWebp], -// [ZoneSettingEditParamsItemsZonesWebsockets]. -type ZoneSettingEditParamsItem interface { - implementsZoneSettingEditParamsItem() -} - -// 0-RTT session resumption enabled for this zone. -type ZoneSettingEditParamsItemsZones0rtt struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZones0rttID] `json:"id"` - // Value of the 0-RTT setting. - Value param.Field[ZoneSettingEditParamsItemsZones0rttValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZones0rtt) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZones0rtt) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZones0rttID string - -const ( - ZoneSettingEditParamsItemsZones0rttID0rtt ZoneSettingEditParamsItemsZones0rttID = "0rtt" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZones0rttEditable bool - -const ( - ZoneSettingEditParamsItemsZones0rttEditableTrue ZoneSettingEditParamsItemsZones0rttEditable = true - ZoneSettingEditParamsItemsZones0rttEditableFalse ZoneSettingEditParamsItemsZones0rttEditable = false -) - -// Value of the 0-RTT setting. -type ZoneSettingEditParamsItemsZones0rttValue string - -const ( - ZoneSettingEditParamsItemsZones0rttValueOn ZoneSettingEditParamsItemsZones0rttValue = "on" - ZoneSettingEditParamsItemsZones0rttValueOff ZoneSettingEditParamsItemsZones0rttValue = "off" -) - -// Advanced protection from Distributed Denial of Service (DDoS) attacks on your -// website. This is an uneditable value that is 'on' in the case of Business and -// Enterprise zones. -type ZoneSettingEditParamsItemsZonesAdvancedDDOS struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesAdvancedDDOSID] `json:"id"` - // Value of the zone setting. Notes: Defaults to on for Business+ plans - Value param.Field[ZoneSettingEditParamsItemsZonesAdvancedDDOSValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesAdvancedDDOS) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesAdvancedDDOS) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesAdvancedDDOSID string - -const ( - ZoneSettingEditParamsItemsZonesAdvancedDDOSIDAdvancedDDOS ZoneSettingEditParamsItemsZonesAdvancedDDOSID = "advanced_ddos" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesAdvancedDDOSEditable bool - -const ( - ZoneSettingEditParamsItemsZonesAdvancedDDOSEditableTrue ZoneSettingEditParamsItemsZonesAdvancedDDOSEditable = true - ZoneSettingEditParamsItemsZonesAdvancedDDOSEditableFalse ZoneSettingEditParamsItemsZonesAdvancedDDOSEditable = false -) - -// Value of the zone setting. Notes: Defaults to on for Business+ plans -type ZoneSettingEditParamsItemsZonesAdvancedDDOSValue string - -const ( - ZoneSettingEditParamsItemsZonesAdvancedDDOSValueOn ZoneSettingEditParamsItemsZonesAdvancedDDOSValue = "on" - ZoneSettingEditParamsItemsZonesAdvancedDDOSValueOff ZoneSettingEditParamsItemsZonesAdvancedDDOSValue = "off" -) - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -type ZoneSettingEditParamsItemsZonesAlwaysOnline struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesAlwaysOnlineID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesAlwaysOnlineValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesAlwaysOnline) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesAlwaysOnline) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesAlwaysOnlineID string - -const ( - ZoneSettingEditParamsItemsZonesAlwaysOnlineIDAlwaysOnline ZoneSettingEditParamsItemsZonesAlwaysOnlineID = "always_online" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesAlwaysOnlineEditable bool - -const ( - ZoneSettingEditParamsItemsZonesAlwaysOnlineEditableTrue ZoneSettingEditParamsItemsZonesAlwaysOnlineEditable = true - ZoneSettingEditParamsItemsZonesAlwaysOnlineEditableFalse ZoneSettingEditParamsItemsZonesAlwaysOnlineEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesAlwaysOnlineValue string - -const ( - ZoneSettingEditParamsItemsZonesAlwaysOnlineValueOn ZoneSettingEditParamsItemsZonesAlwaysOnlineValue = "on" - ZoneSettingEditParamsItemsZonesAlwaysOnlineValueOff ZoneSettingEditParamsItemsZonesAlwaysOnlineValue = "off" -) - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -type ZoneSettingEditParamsItemsZonesAlwaysUseHTTPs struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesAlwaysUseHTTPs) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesAlwaysUseHTTPs) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsID string - -const ( - ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsIDAlwaysUseHTTPs ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsID = "always_use_https" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsEditable bool - -const ( - ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsEditableTrue ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsEditable = true - ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsEditableFalse ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValue string - -const ( - ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValueOn ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValue = "on" - ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValueOff ZoneSettingEditParamsItemsZonesAlwaysUseHTTPsValue = "off" -) - -// Enable the Automatic HTTPS Rewrites feature for this zone. -type ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewrites struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesID] `json:"id"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewrites) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewrites) implementsZoneSettingEditParamsItem() { -} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesID string - -const ( - ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesIDAutomaticHTTPsRewrites ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesID = "automatic_https_rewrites" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesEditable bool - -const ( - ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesEditableTrue ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesEditable = true - ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesEditableFalse ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValue string - -const ( - ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValueOn ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValue = "on" - ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValueOff ZoneSettingEditParamsItemsZonesAutomaticHTTPsRewritesValue = "off" -) - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -type ZoneSettingEditParamsItemsZonesBrotli struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesBrotliID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesBrotliValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesBrotli) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesBrotli) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesBrotliID string - -const ( - ZoneSettingEditParamsItemsZonesBrotliIDBrotli ZoneSettingEditParamsItemsZonesBrotliID = "brotli" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesBrotliEditable bool - -const ( - ZoneSettingEditParamsItemsZonesBrotliEditableTrue ZoneSettingEditParamsItemsZonesBrotliEditable = true - ZoneSettingEditParamsItemsZonesBrotliEditableFalse ZoneSettingEditParamsItemsZonesBrotliEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesBrotliValue string - -const ( - ZoneSettingEditParamsItemsZonesBrotliValueOff ZoneSettingEditParamsItemsZonesBrotliValue = "off" - ZoneSettingEditParamsItemsZonesBrotliValueOn ZoneSettingEditParamsItemsZonesBrotliValue = "on" -) - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -type ZoneSettingEditParamsItemsZonesBrowserCacheTTL struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesBrowserCacheTTLID] `json:"id"` - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value param.Field[ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesBrowserCacheTTL) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesBrowserCacheTTL) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesBrowserCacheTTLID string - -const ( - ZoneSettingEditParamsItemsZonesBrowserCacheTTLIDBrowserCacheTTL ZoneSettingEditParamsItemsZonesBrowserCacheTTLID = "browser_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesBrowserCacheTTLEditable bool - -const ( - ZoneSettingEditParamsItemsZonesBrowserCacheTTLEditableTrue ZoneSettingEditParamsItemsZonesBrowserCacheTTLEditable = true - ZoneSettingEditParamsItemsZonesBrowserCacheTTLEditableFalse ZoneSettingEditParamsItemsZonesBrowserCacheTTLEditable = false -) - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue float64 - -const ( - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue0 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 0 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue30 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 30 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue60 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 60 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue120 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 120 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue300 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 300 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue1200 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 1200 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue1800 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 1800 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue3600 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 3600 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue7200 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 7200 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue10800 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 10800 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue14400 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 14400 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue18000 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 18000 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue28800 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 28800 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue43200 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 43200 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue57600 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 57600 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue72000 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 72000 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue86400 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 86400 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue172800 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 172800 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue259200 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 259200 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue345600 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 345600 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue432000 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 432000 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue691200 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 691200 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue1382400 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 1382400 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue2073600 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 2073600 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue2678400 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 2678400 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue5356800 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 5356800 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue16070400 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 16070400 - ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue31536000 ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue = 31536000 -) - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -type ZoneSettingEditParamsItemsZonesBrowserCheck struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesBrowserCheckID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesBrowserCheckValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesBrowserCheck) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesBrowserCheck) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesBrowserCheckID string - -const ( - ZoneSettingEditParamsItemsZonesBrowserCheckIDBrowserCheck ZoneSettingEditParamsItemsZonesBrowserCheckID = "browser_check" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesBrowserCheckEditable bool - -const ( - ZoneSettingEditParamsItemsZonesBrowserCheckEditableTrue ZoneSettingEditParamsItemsZonesBrowserCheckEditable = true - ZoneSettingEditParamsItemsZonesBrowserCheckEditableFalse ZoneSettingEditParamsItemsZonesBrowserCheckEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesBrowserCheckValue string - -const ( - ZoneSettingEditParamsItemsZonesBrowserCheckValueOn ZoneSettingEditParamsItemsZonesBrowserCheckValue = "on" - ZoneSettingEditParamsItemsZonesBrowserCheckValueOff ZoneSettingEditParamsItemsZonesBrowserCheckValue = "off" -) - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -type ZoneSettingEditParamsItemsZonesCacheLevel struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesCacheLevelID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesCacheLevelValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesCacheLevel) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesCacheLevel) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesCacheLevelID string - -const ( - ZoneSettingEditParamsItemsZonesCacheLevelIDCacheLevel ZoneSettingEditParamsItemsZonesCacheLevelID = "cache_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesCacheLevelEditable bool - -const ( - ZoneSettingEditParamsItemsZonesCacheLevelEditableTrue ZoneSettingEditParamsItemsZonesCacheLevelEditable = true - ZoneSettingEditParamsItemsZonesCacheLevelEditableFalse ZoneSettingEditParamsItemsZonesCacheLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesCacheLevelValue string - -const ( - ZoneSettingEditParamsItemsZonesCacheLevelValueAggressive ZoneSettingEditParamsItemsZonesCacheLevelValue = "aggressive" - ZoneSettingEditParamsItemsZonesCacheLevelValueBasic ZoneSettingEditParamsItemsZonesCacheLevelValue = "basic" - ZoneSettingEditParamsItemsZonesCacheLevelValueSimplified ZoneSettingEditParamsItemsZonesCacheLevelValue = "simplified" -) - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -type ZoneSettingEditParamsItemsZonesChallengeTTL struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesChallengeTTLID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesChallengeTTLValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesChallengeTTL) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesChallengeTTL) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesChallengeTTLID string - -const ( - ZoneSettingEditParamsItemsZonesChallengeTTLIDChallengeTTL ZoneSettingEditParamsItemsZonesChallengeTTLID = "challenge_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesChallengeTTLEditable bool - -const ( - ZoneSettingEditParamsItemsZonesChallengeTTLEditableTrue ZoneSettingEditParamsItemsZonesChallengeTTLEditable = true - ZoneSettingEditParamsItemsZonesChallengeTTLEditableFalse ZoneSettingEditParamsItemsZonesChallengeTTLEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesChallengeTTLValue float64 - -const ( - ZoneSettingEditParamsItemsZonesChallengeTTLValue300 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 300 - ZoneSettingEditParamsItemsZonesChallengeTTLValue900 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 900 - ZoneSettingEditParamsItemsZonesChallengeTTLValue1800 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 1800 - ZoneSettingEditParamsItemsZonesChallengeTTLValue2700 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 2700 - ZoneSettingEditParamsItemsZonesChallengeTTLValue3600 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 3600 - ZoneSettingEditParamsItemsZonesChallengeTTLValue7200 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 7200 - ZoneSettingEditParamsItemsZonesChallengeTTLValue10800 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 10800 - ZoneSettingEditParamsItemsZonesChallengeTTLValue14400 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 14400 - ZoneSettingEditParamsItemsZonesChallengeTTLValue28800 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 28800 - ZoneSettingEditParamsItemsZonesChallengeTTLValue57600 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 57600 - ZoneSettingEditParamsItemsZonesChallengeTTLValue86400 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 86400 - ZoneSettingEditParamsItemsZonesChallengeTTLValue604800 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 604800 - ZoneSettingEditParamsItemsZonesChallengeTTLValue2592000 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 2592000 - ZoneSettingEditParamsItemsZonesChallengeTTLValue31536000 ZoneSettingEditParamsItemsZonesChallengeTTLValue = 31536000 -) - -// An allowlist of ciphers for TLS termination. These ciphers must be in the -// BoringSSL format. -type ZoneSettingEditParamsItemsZonesCiphers struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesCiphersID] `json:"id"` - // Value of the zone setting. - Value param.Field[[]string] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesCiphers) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesCiphers) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesCiphersID string - -const ( - ZoneSettingEditParamsItemsZonesCiphersIDCiphers ZoneSettingEditParamsItemsZonesCiphersID = "ciphers" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesCiphersEditable bool - -const ( - ZoneSettingEditParamsItemsZonesCiphersEditableTrue ZoneSettingEditParamsItemsZonesCiphersEditable = true - ZoneSettingEditParamsItemsZonesCiphersEditableFalse ZoneSettingEditParamsItemsZonesCiphersEditable = false -) - -// Whether or not cname flattening is on. -type ZoneSettingEditParamsItemsZonesCnameFlattening struct { - // How to flatten the cname destination. - ID param.Field[ZoneSettingEditParamsItemsZonesCnameFlatteningID] `json:"id"` - // Value of the cname flattening setting. - Value param.Field[ZoneSettingEditParamsItemsZonesCnameFlatteningValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesCnameFlattening) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesCnameFlattening) implementsZoneSettingEditParamsItem() {} - -// How to flatten the cname destination. -type ZoneSettingEditParamsItemsZonesCnameFlatteningID string - -const ( - ZoneSettingEditParamsItemsZonesCnameFlatteningIDCnameFlattening ZoneSettingEditParamsItemsZonesCnameFlatteningID = "cname_flattening" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesCnameFlatteningEditable bool - -const ( - ZoneSettingEditParamsItemsZonesCnameFlatteningEditableTrue ZoneSettingEditParamsItemsZonesCnameFlatteningEditable = true - ZoneSettingEditParamsItemsZonesCnameFlatteningEditableFalse ZoneSettingEditParamsItemsZonesCnameFlatteningEditable = false -) - -// Value of the cname flattening setting. -type ZoneSettingEditParamsItemsZonesCnameFlatteningValue string - -const ( - ZoneSettingEditParamsItemsZonesCnameFlatteningValueFlattenAtRoot ZoneSettingEditParamsItemsZonesCnameFlatteningValue = "flatten_at_root" - ZoneSettingEditParamsItemsZonesCnameFlatteningValueFlattenAll ZoneSettingEditParamsItemsZonesCnameFlatteningValue = "flatten_all" -) - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -type ZoneSettingEditParamsItemsZonesDevelopmentMode struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesDevelopmentModeID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesDevelopmentModeValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesDevelopmentMode) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesDevelopmentMode) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesDevelopmentModeID string - -const ( - ZoneSettingEditParamsItemsZonesDevelopmentModeIDDevelopmentMode ZoneSettingEditParamsItemsZonesDevelopmentModeID = "development_mode" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesDevelopmentModeEditable bool - -const ( - ZoneSettingEditParamsItemsZonesDevelopmentModeEditableTrue ZoneSettingEditParamsItemsZonesDevelopmentModeEditable = true - ZoneSettingEditParamsItemsZonesDevelopmentModeEditableFalse ZoneSettingEditParamsItemsZonesDevelopmentModeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesDevelopmentModeValue string - -const ( - ZoneSettingEditParamsItemsZonesDevelopmentModeValueOn ZoneSettingEditParamsItemsZonesDevelopmentModeValue = "on" - ZoneSettingEditParamsItemsZonesDevelopmentModeValueOff ZoneSettingEditParamsItemsZonesDevelopmentModeValue = "off" -) - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -type ZoneSettingEditParamsItemsZonesEarlyHints struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesEarlyHintsID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesEarlyHintsValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesEarlyHints) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesEarlyHints) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesEarlyHintsID string - -const ( - ZoneSettingEditParamsItemsZonesEarlyHintsIDEarlyHints ZoneSettingEditParamsItemsZonesEarlyHintsID = "early_hints" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesEarlyHintsEditable bool - -const ( - ZoneSettingEditParamsItemsZonesEarlyHintsEditableTrue ZoneSettingEditParamsItemsZonesEarlyHintsEditable = true - ZoneSettingEditParamsItemsZonesEarlyHintsEditableFalse ZoneSettingEditParamsItemsZonesEarlyHintsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesEarlyHintsValue string - -const ( - ZoneSettingEditParamsItemsZonesEarlyHintsValueOn ZoneSettingEditParamsItemsZonesEarlyHintsValue = "on" - ZoneSettingEditParamsItemsZonesEarlyHintsValueOff ZoneSettingEditParamsItemsZonesEarlyHintsValue = "off" -) - -// Time (in seconds) that a resource will be ensured to remain on Cloudflare's -// cache servers. -type ZoneSettingEditParamsItemsZonesEdgeCacheTTL struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesEdgeCacheTTLID] `json:"id"` - // Value of the zone setting. Notes: The minimum TTL available depends on the plan - // level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) - Value param.Field[ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesEdgeCacheTTL) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesEdgeCacheTTL) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesEdgeCacheTTLID string - -const ( - ZoneSettingEditParamsItemsZonesEdgeCacheTTLIDEdgeCacheTTL ZoneSettingEditParamsItemsZonesEdgeCacheTTLID = "edge_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesEdgeCacheTTLEditable bool - -const ( - ZoneSettingEditParamsItemsZonesEdgeCacheTTLEditableTrue ZoneSettingEditParamsItemsZonesEdgeCacheTTLEditable = true - ZoneSettingEditParamsItemsZonesEdgeCacheTTLEditableFalse ZoneSettingEditParamsItemsZonesEdgeCacheTTLEditable = false -) - -// Value of the zone setting. Notes: The minimum TTL available depends on the plan -// level of the zone. (Enterprise = 30, Business = 1800, Pro = 3600, Free = 7200) -type ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue float64 - -const ( - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue30 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 30 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue60 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 60 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue300 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 300 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue1200 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 1200 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue1800 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 1800 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue3600 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 3600 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue7200 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 7200 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue10800 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 10800 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue14400 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 14400 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue18000 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 18000 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue28800 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 28800 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue43200 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 43200 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue57600 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 57600 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue72000 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 72000 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue86400 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 86400 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue172800 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 172800 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue259200 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 259200 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue345600 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 345600 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue432000 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 432000 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue518400 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 518400 - ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue604800 ZoneSettingEditParamsItemsZonesEdgeCacheTTLValue = 604800 -) - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -type ZoneSettingEditParamsItemsZonesEmailObfuscation struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesEmailObfuscationID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesEmailObfuscationValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesEmailObfuscation) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesEmailObfuscation) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesEmailObfuscationID string - -const ( - ZoneSettingEditParamsItemsZonesEmailObfuscationIDEmailObfuscation ZoneSettingEditParamsItemsZonesEmailObfuscationID = "email_obfuscation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesEmailObfuscationEditable bool - -const ( - ZoneSettingEditParamsItemsZonesEmailObfuscationEditableTrue ZoneSettingEditParamsItemsZonesEmailObfuscationEditable = true - ZoneSettingEditParamsItemsZonesEmailObfuscationEditableFalse ZoneSettingEditParamsItemsZonesEmailObfuscationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesEmailObfuscationValue string - -const ( - ZoneSettingEditParamsItemsZonesEmailObfuscationValueOn ZoneSettingEditParamsItemsZonesEmailObfuscationValue = "on" - ZoneSettingEditParamsItemsZonesEmailObfuscationValueOff ZoneSettingEditParamsItemsZonesEmailObfuscationValue = "off" -) - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingEditParamsItemsZonesH2Prioritization struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesH2PrioritizationID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesH2PrioritizationValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesH2Prioritization) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesH2Prioritization) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesH2PrioritizationID string - -const ( - ZoneSettingEditParamsItemsZonesH2PrioritizationIDH2Prioritization ZoneSettingEditParamsItemsZonesH2PrioritizationID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesH2PrioritizationEditable bool - -const ( - ZoneSettingEditParamsItemsZonesH2PrioritizationEditableTrue ZoneSettingEditParamsItemsZonesH2PrioritizationEditable = true - ZoneSettingEditParamsItemsZonesH2PrioritizationEditableFalse ZoneSettingEditParamsItemsZonesH2PrioritizationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesH2PrioritizationValue string - -const ( - ZoneSettingEditParamsItemsZonesH2PrioritizationValueOn ZoneSettingEditParamsItemsZonesH2PrioritizationValue = "on" - ZoneSettingEditParamsItemsZonesH2PrioritizationValueOff ZoneSettingEditParamsItemsZonesH2PrioritizationValue = "off" - ZoneSettingEditParamsItemsZonesH2PrioritizationValueCustom ZoneSettingEditParamsItemsZonesH2PrioritizationValue = "custom" -) - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -type ZoneSettingEditParamsItemsZonesHotlinkProtection struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesHotlinkProtectionID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesHotlinkProtectionValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesHotlinkProtection) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesHotlinkProtection) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesHotlinkProtectionID string - -const ( - ZoneSettingEditParamsItemsZonesHotlinkProtectionIDHotlinkProtection ZoneSettingEditParamsItemsZonesHotlinkProtectionID = "hotlink_protection" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesHotlinkProtectionEditable bool - -const ( - ZoneSettingEditParamsItemsZonesHotlinkProtectionEditableTrue ZoneSettingEditParamsItemsZonesHotlinkProtectionEditable = true - ZoneSettingEditParamsItemsZonesHotlinkProtectionEditableFalse ZoneSettingEditParamsItemsZonesHotlinkProtectionEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesHotlinkProtectionValue string - -const ( - ZoneSettingEditParamsItemsZonesHotlinkProtectionValueOn ZoneSettingEditParamsItemsZonesHotlinkProtectionValue = "on" - ZoneSettingEditParamsItemsZonesHotlinkProtectionValueOff ZoneSettingEditParamsItemsZonesHotlinkProtectionValue = "off" -) - -// HTTP2 enabled for this zone. -type ZoneSettingEditParamsItemsZonesHTTP2 struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesHTTP2ID] `json:"id"` - // Value of the HTTP2 setting. - Value param.Field[ZoneSettingEditParamsItemsZonesHTTP2Value] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesHTTP2) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesHTTP2) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesHTTP2ID string - -const ( - ZoneSettingEditParamsItemsZonesHTTP2IDHTTP2 ZoneSettingEditParamsItemsZonesHTTP2ID = "http2" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesHTTP2Editable bool - -const ( - ZoneSettingEditParamsItemsZonesHTTP2EditableTrue ZoneSettingEditParamsItemsZonesHTTP2Editable = true - ZoneSettingEditParamsItemsZonesHTTP2EditableFalse ZoneSettingEditParamsItemsZonesHTTP2Editable = false -) - -// Value of the HTTP2 setting. -type ZoneSettingEditParamsItemsZonesHTTP2Value string - -const ( - ZoneSettingEditParamsItemsZonesHTTP2ValueOn ZoneSettingEditParamsItemsZonesHTTP2Value = "on" - ZoneSettingEditParamsItemsZonesHTTP2ValueOff ZoneSettingEditParamsItemsZonesHTTP2Value = "off" -) - -// HTTP3 enabled for this zone. -type ZoneSettingEditParamsItemsZonesHTTP3 struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesHTTP3ID] `json:"id"` - // Value of the HTTP3 setting. - Value param.Field[ZoneSettingEditParamsItemsZonesHTTP3Value] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesHTTP3) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesHTTP3) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesHTTP3ID string - -const ( - ZoneSettingEditParamsItemsZonesHTTP3IDHTTP3 ZoneSettingEditParamsItemsZonesHTTP3ID = "http3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesHTTP3Editable bool - -const ( - ZoneSettingEditParamsItemsZonesHTTP3EditableTrue ZoneSettingEditParamsItemsZonesHTTP3Editable = true - ZoneSettingEditParamsItemsZonesHTTP3EditableFalse ZoneSettingEditParamsItemsZonesHTTP3Editable = false -) - -// Value of the HTTP3 setting. -type ZoneSettingEditParamsItemsZonesHTTP3Value string - -const ( - ZoneSettingEditParamsItemsZonesHTTP3ValueOn ZoneSettingEditParamsItemsZonesHTTP3Value = "on" - ZoneSettingEditParamsItemsZonesHTTP3ValueOff ZoneSettingEditParamsItemsZonesHTTP3Value = "off" -) - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingEditParamsItemsZonesImageResizing struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesImageResizingID] `json:"id"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value param.Field[ZoneSettingEditParamsItemsZonesImageResizingValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesImageResizing) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesImageResizing) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesImageResizingID string - -const ( - ZoneSettingEditParamsItemsZonesImageResizingIDImageResizing ZoneSettingEditParamsItemsZonesImageResizingID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesImageResizingEditable bool - -const ( - ZoneSettingEditParamsItemsZonesImageResizingEditableTrue ZoneSettingEditParamsItemsZonesImageResizingEditable = true - ZoneSettingEditParamsItemsZonesImageResizingEditableFalse ZoneSettingEditParamsItemsZonesImageResizingEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingEditParamsItemsZonesImageResizingValue string - -const ( - ZoneSettingEditParamsItemsZonesImageResizingValueOn ZoneSettingEditParamsItemsZonesImageResizingValue = "on" - ZoneSettingEditParamsItemsZonesImageResizingValueOff ZoneSettingEditParamsItemsZonesImageResizingValue = "off" - ZoneSettingEditParamsItemsZonesImageResizingValueOpen ZoneSettingEditParamsItemsZonesImageResizingValue = "open" -) - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -type ZoneSettingEditParamsItemsZonesIPGeolocation struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesIPGeolocationID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesIPGeolocationValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesIPGeolocation) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesIPGeolocation) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesIPGeolocationID string - -const ( - ZoneSettingEditParamsItemsZonesIPGeolocationIDIPGeolocation ZoneSettingEditParamsItemsZonesIPGeolocationID = "ip_geolocation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesIPGeolocationEditable bool - -const ( - ZoneSettingEditParamsItemsZonesIPGeolocationEditableTrue ZoneSettingEditParamsItemsZonesIPGeolocationEditable = true - ZoneSettingEditParamsItemsZonesIPGeolocationEditableFalse ZoneSettingEditParamsItemsZonesIPGeolocationEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesIPGeolocationValue string - -const ( - ZoneSettingEditParamsItemsZonesIPGeolocationValueOn ZoneSettingEditParamsItemsZonesIPGeolocationValue = "on" - ZoneSettingEditParamsItemsZonesIPGeolocationValueOff ZoneSettingEditParamsItemsZonesIPGeolocationValue = "off" -) - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -type ZoneSettingEditParamsItemsZonesIPV6 struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesIPV6ID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesIPV6Value] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesIPV6) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesIPV6) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesIPV6ID string - -const ( - ZoneSettingEditParamsItemsZonesIPV6IDIPV6 ZoneSettingEditParamsItemsZonesIPV6ID = "ipv6" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesIPV6Editable bool - -const ( - ZoneSettingEditParamsItemsZonesIPV6EditableTrue ZoneSettingEditParamsItemsZonesIPV6Editable = true - ZoneSettingEditParamsItemsZonesIPV6EditableFalse ZoneSettingEditParamsItemsZonesIPV6Editable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesIPV6Value string - -const ( - ZoneSettingEditParamsItemsZonesIPV6ValueOff ZoneSettingEditParamsItemsZonesIPV6Value = "off" - ZoneSettingEditParamsItemsZonesIPV6ValueOn ZoneSettingEditParamsItemsZonesIPV6Value = "on" -) - -// Maximum size of an allowable upload. -type ZoneSettingEditParamsItemsZonesMaxUpload struct { - // identifier of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesMaxUploadID] `json:"id"` - // Value of the zone setting. Notes: The size depends on the plan level of the - // zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) - Value param.Field[ZoneSettingEditParamsItemsZonesMaxUploadValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesMaxUpload) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesMaxUpload) implementsZoneSettingEditParamsItem() {} - -// identifier of the zone setting. -type ZoneSettingEditParamsItemsZonesMaxUploadID string - -const ( - ZoneSettingEditParamsItemsZonesMaxUploadIDMaxUpload ZoneSettingEditParamsItemsZonesMaxUploadID = "max_upload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesMaxUploadEditable bool - -const ( - ZoneSettingEditParamsItemsZonesMaxUploadEditableTrue ZoneSettingEditParamsItemsZonesMaxUploadEditable = true - ZoneSettingEditParamsItemsZonesMaxUploadEditableFalse ZoneSettingEditParamsItemsZonesMaxUploadEditable = false -) - -// Value of the zone setting. Notes: The size depends on the plan level of the -// zone. (Enterprise = 500, Business = 200, Pro = 100, Free = 100) -type ZoneSettingEditParamsItemsZonesMaxUploadValue float64 - -const ( - ZoneSettingEditParamsItemsZonesMaxUploadValue100 ZoneSettingEditParamsItemsZonesMaxUploadValue = 100 - ZoneSettingEditParamsItemsZonesMaxUploadValue200 ZoneSettingEditParamsItemsZonesMaxUploadValue = 200 - ZoneSettingEditParamsItemsZonesMaxUploadValue500 ZoneSettingEditParamsItemsZonesMaxUploadValue = 500 -) - -// Only accepts HTTPS requests that use at least the TLS protocol version -// specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be -// rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. -type ZoneSettingEditParamsItemsZonesMinTLSVersion struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesMinTLSVersionID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesMinTLSVersionValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesMinTLSVersion) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesMinTLSVersion) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesMinTLSVersionID string - -const ( - ZoneSettingEditParamsItemsZonesMinTLSVersionIDMinTLSVersion ZoneSettingEditParamsItemsZonesMinTLSVersionID = "min_tls_version" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesMinTLSVersionEditable bool - -const ( - ZoneSettingEditParamsItemsZonesMinTLSVersionEditableTrue ZoneSettingEditParamsItemsZonesMinTLSVersionEditable = true - ZoneSettingEditParamsItemsZonesMinTLSVersionEditableFalse ZoneSettingEditParamsItemsZonesMinTLSVersionEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesMinTLSVersionValue string - -const ( - ZoneSettingEditParamsItemsZonesMinTLSVersionValue1_0 ZoneSettingEditParamsItemsZonesMinTLSVersionValue = "1.0" - ZoneSettingEditParamsItemsZonesMinTLSVersionValue1_1 ZoneSettingEditParamsItemsZonesMinTLSVersionValue = "1.1" - ZoneSettingEditParamsItemsZonesMinTLSVersionValue1_2 ZoneSettingEditParamsItemsZonesMinTLSVersionValue = "1.2" - ZoneSettingEditParamsItemsZonesMinTLSVersionValue1_3 ZoneSettingEditParamsItemsZonesMinTLSVersionValue = "1.3" -) - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -type ZoneSettingEditParamsItemsZonesMinify struct { - // Zone setting identifier. - ID param.Field[ZoneSettingEditParamsItemsZonesMinifyID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesMinifyValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesMinify) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesMinify) implementsZoneSettingEditParamsItem() {} - -// Zone setting identifier. -type ZoneSettingEditParamsItemsZonesMinifyID string - -const ( - ZoneSettingEditParamsItemsZonesMinifyIDMinify ZoneSettingEditParamsItemsZonesMinifyID = "minify" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesMinifyEditable bool - -const ( - ZoneSettingEditParamsItemsZonesMinifyEditableTrue ZoneSettingEditParamsItemsZonesMinifyEditable = true - ZoneSettingEditParamsItemsZonesMinifyEditableFalse ZoneSettingEditParamsItemsZonesMinifyEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesMinifyValue struct { - // Automatically minify all CSS files for your website. - Css param.Field[ZoneSettingEditParamsItemsZonesMinifyValueCss] `json:"css"` - // Automatically minify all HTML files for your website. - HTML param.Field[ZoneSettingEditParamsItemsZonesMinifyValueHTML] `json:"html"` - // Automatically minify all JavaScript files for your website. - Js param.Field[ZoneSettingEditParamsItemsZonesMinifyValueJs] `json:"js"` -} - -func (r ZoneSettingEditParamsItemsZonesMinifyValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingEditParamsItemsZonesMinifyValueCss string - -const ( - ZoneSettingEditParamsItemsZonesMinifyValueCssOn ZoneSettingEditParamsItemsZonesMinifyValueCss = "on" - ZoneSettingEditParamsItemsZonesMinifyValueCssOff ZoneSettingEditParamsItemsZonesMinifyValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingEditParamsItemsZonesMinifyValueHTML string - -const ( - ZoneSettingEditParamsItemsZonesMinifyValueHTMLOn ZoneSettingEditParamsItemsZonesMinifyValueHTML = "on" - ZoneSettingEditParamsItemsZonesMinifyValueHTMLOff ZoneSettingEditParamsItemsZonesMinifyValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingEditParamsItemsZonesMinifyValueJs string - -const ( - ZoneSettingEditParamsItemsZonesMinifyValueJsOn ZoneSettingEditParamsItemsZonesMinifyValueJs = "on" - ZoneSettingEditParamsItemsZonesMinifyValueJsOff ZoneSettingEditParamsItemsZonesMinifyValueJs = "off" -) - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to -// [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for -// more information. -type ZoneSettingEditParamsItemsZonesMirage struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesMirageID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesMirageValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesMirage) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesMirage) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesMirageID string - -const ( - ZoneSettingEditParamsItemsZonesMirageIDMirage ZoneSettingEditParamsItemsZonesMirageID = "mirage" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesMirageEditable bool - -const ( - ZoneSettingEditParamsItemsZonesMirageEditableTrue ZoneSettingEditParamsItemsZonesMirageEditable = true - ZoneSettingEditParamsItemsZonesMirageEditableFalse ZoneSettingEditParamsItemsZonesMirageEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesMirageValue string - -const ( - ZoneSettingEditParamsItemsZonesMirageValueOn ZoneSettingEditParamsItemsZonesMirageValue = "on" - ZoneSettingEditParamsItemsZonesMirageValueOff ZoneSettingEditParamsItemsZonesMirageValue = "off" -) - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -type ZoneSettingEditParamsItemsZonesMobileRedirect struct { - // Identifier of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesMobileRedirectID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesMobileRedirectValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesMobileRedirect) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesMobileRedirect) implementsZoneSettingEditParamsItem() {} - -// Identifier of the zone setting. -type ZoneSettingEditParamsItemsZonesMobileRedirectID string - -const ( - ZoneSettingEditParamsItemsZonesMobileRedirectIDMobileRedirect ZoneSettingEditParamsItemsZonesMobileRedirectID = "mobile_redirect" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesMobileRedirectEditable bool - -const ( - ZoneSettingEditParamsItemsZonesMobileRedirectEditableTrue ZoneSettingEditParamsItemsZonesMobileRedirectEditable = true - ZoneSettingEditParamsItemsZonesMobileRedirectEditableFalse ZoneSettingEditParamsItemsZonesMobileRedirectEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesMobileRedirectValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain param.Field[string] `json:"mobile_subdomain"` - // Whether or not mobile redirect is enabled. - Status param.Field[ZoneSettingEditParamsItemsZonesMobileRedirectValueStatus] `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri param.Field[bool] `json:"strip_uri"` -} - -func (r ZoneSettingEditParamsItemsZonesMobileRedirectValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingEditParamsItemsZonesMobileRedirectValueStatus string - -const ( - ZoneSettingEditParamsItemsZonesMobileRedirectValueStatusOn ZoneSettingEditParamsItemsZonesMobileRedirectValueStatus = "on" - ZoneSettingEditParamsItemsZonesMobileRedirectValueStatusOff ZoneSettingEditParamsItemsZonesMobileRedirectValueStatus = "off" -) - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingEditParamsItemsZonesNEL struct { - // Zone setting identifier. - ID param.Field[ZoneSettingEditParamsItemsZonesNELID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesNELValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesNEL) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesNEL) implementsZoneSettingEditParamsItem() {} - -// Zone setting identifier. -type ZoneSettingEditParamsItemsZonesNELID string - -const ( - ZoneSettingEditParamsItemsZonesNELIDNEL ZoneSettingEditParamsItemsZonesNELID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesNELEditable bool - -const ( - ZoneSettingEditParamsItemsZonesNELEditableTrue ZoneSettingEditParamsItemsZonesNELEditable = true - ZoneSettingEditParamsItemsZonesNELEditableFalse ZoneSettingEditParamsItemsZonesNELEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesNELValue struct { - Enabled param.Field[bool] `json:"enabled"` -} - -func (r ZoneSettingEditParamsItemsZonesNELValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Enables the Opportunistic Encryption feature for a zone. -type ZoneSettingEditParamsItemsZonesOpportunisticEncryption struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesOpportunisticEncryptionID] `json:"id"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesOpportunisticEncryption) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesOpportunisticEncryption) implementsZoneSettingEditParamsItem() { -} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesOpportunisticEncryptionID string - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticEncryptionIDOpportunisticEncryption ZoneSettingEditParamsItemsZonesOpportunisticEncryptionID = "opportunistic_encryption" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesOpportunisticEncryptionEditable bool - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticEncryptionEditableTrue ZoneSettingEditParamsItemsZonesOpportunisticEncryptionEditable = true - ZoneSettingEditParamsItemsZonesOpportunisticEncryptionEditableFalse ZoneSettingEditParamsItemsZonesOpportunisticEncryptionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValue string - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValueOn ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValue = "on" - ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValueOff ZoneSettingEditParamsItemsZonesOpportunisticEncryptionValue = "off" -) - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -type ZoneSettingEditParamsItemsZonesOpportunisticOnion struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesOpportunisticOnionID] `json:"id"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingEditParamsItemsZonesOpportunisticOnionValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesOpportunisticOnion) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesOpportunisticOnion) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesOpportunisticOnionID string - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticOnionIDOpportunisticOnion ZoneSettingEditParamsItemsZonesOpportunisticOnionID = "opportunistic_onion" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesOpportunisticOnionEditable bool - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticOnionEditableTrue ZoneSettingEditParamsItemsZonesOpportunisticOnionEditable = true - ZoneSettingEditParamsItemsZonesOpportunisticOnionEditableFalse ZoneSettingEditParamsItemsZonesOpportunisticOnionEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditParamsItemsZonesOpportunisticOnionValue string - -const ( - ZoneSettingEditParamsItemsZonesOpportunisticOnionValueOn ZoneSettingEditParamsItemsZonesOpportunisticOnionValue = "on" - ZoneSettingEditParamsItemsZonesOpportunisticOnionValueOff ZoneSettingEditParamsItemsZonesOpportunisticOnionValue = "off" -) - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingEditParamsItemsZonesOrangeToOrange struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesOrangeToOrangeID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesOrangeToOrangeValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesOrangeToOrange) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesOrangeToOrange) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesOrangeToOrangeID string - -const ( - ZoneSettingEditParamsItemsZonesOrangeToOrangeIDOrangeToOrange ZoneSettingEditParamsItemsZonesOrangeToOrangeID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesOrangeToOrangeEditable bool - -const ( - ZoneSettingEditParamsItemsZonesOrangeToOrangeEditableTrue ZoneSettingEditParamsItemsZonesOrangeToOrangeEditable = true - ZoneSettingEditParamsItemsZonesOrangeToOrangeEditableFalse ZoneSettingEditParamsItemsZonesOrangeToOrangeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesOrangeToOrangeValue string - -const ( - ZoneSettingEditParamsItemsZonesOrangeToOrangeValueOn ZoneSettingEditParamsItemsZonesOrangeToOrangeValue = "on" - ZoneSettingEditParamsItemsZonesOrangeToOrangeValueOff ZoneSettingEditParamsItemsZonesOrangeToOrangeValue = "off" -) - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -type ZoneSettingEditParamsItemsZonesOriginErrorPagePassThru struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesOriginErrorPagePassThru) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesOriginErrorPagePassThru) implementsZoneSettingEditParamsItem() { -} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruID string - -const ( - ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruIDOriginErrorPagePassThru ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruID = "origin_error_page_pass_thru" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruEditable bool - -const ( - ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruEditableTrue ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruEditable = true - ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruEditableFalse ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValue string - -const ( - ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValueOn ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValue = "on" - ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValueOff ZoneSettingEditParamsItemsZonesOriginErrorPagePassThruValue = "off" -) - -type ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersion struct { - // Identifier of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersionID] `json:"id,required"` -} - -func (r ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersion) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersion) implementsZoneSettingEditParamsItem() {} - -// Identifier of the zone setting. -type ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersionID string - -const ( - ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersionIDOriginMaxHTTPVersion ZoneSettingEditParamsItemsZonesOriginMaxHTTPVersionID = "origin_max_http_version" -) - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingEditParamsItemsZonesPolish struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesPolishID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesPolishValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesPolish) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesPolish) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesPolishID string - -const ( - ZoneSettingEditParamsItemsZonesPolishIDPolish ZoneSettingEditParamsItemsZonesPolishID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesPolishEditable bool - -const ( - ZoneSettingEditParamsItemsZonesPolishEditableTrue ZoneSettingEditParamsItemsZonesPolishEditable = true - ZoneSettingEditParamsItemsZonesPolishEditableFalse ZoneSettingEditParamsItemsZonesPolishEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesPolishValue string - -const ( - ZoneSettingEditParamsItemsZonesPolishValueOff ZoneSettingEditParamsItemsZonesPolishValue = "off" - ZoneSettingEditParamsItemsZonesPolishValueLossless ZoneSettingEditParamsItemsZonesPolishValue = "lossless" - ZoneSettingEditParamsItemsZonesPolishValueLossy ZoneSettingEditParamsItemsZonesPolishValue = "lossy" -) - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -type ZoneSettingEditParamsItemsZonesPrefetchPreload struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesPrefetchPreloadID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesPrefetchPreloadValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesPrefetchPreload) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesPrefetchPreload) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesPrefetchPreloadID string - -const ( - ZoneSettingEditParamsItemsZonesPrefetchPreloadIDPrefetchPreload ZoneSettingEditParamsItemsZonesPrefetchPreloadID = "prefetch_preload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesPrefetchPreloadEditable bool - -const ( - ZoneSettingEditParamsItemsZonesPrefetchPreloadEditableTrue ZoneSettingEditParamsItemsZonesPrefetchPreloadEditable = true - ZoneSettingEditParamsItemsZonesPrefetchPreloadEditableFalse ZoneSettingEditParamsItemsZonesPrefetchPreloadEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesPrefetchPreloadValue string - -const ( - ZoneSettingEditParamsItemsZonesPrefetchPreloadValueOn ZoneSettingEditParamsItemsZonesPrefetchPreloadValue = "on" - ZoneSettingEditParamsItemsZonesPrefetchPreloadValueOff ZoneSettingEditParamsItemsZonesPrefetchPreloadValue = "off" -) - -// Maximum time between two read operations from origin. -type ZoneSettingEditParamsItemsZonesProxyReadTimeout struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesProxyReadTimeoutID] `json:"id"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value param.Field[float64] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesProxyReadTimeout) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesProxyReadTimeout) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesProxyReadTimeoutID string - -const ( - ZoneSettingEditParamsItemsZonesProxyReadTimeoutIDProxyReadTimeout ZoneSettingEditParamsItemsZonesProxyReadTimeoutID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesProxyReadTimeoutEditable bool - -const ( - ZoneSettingEditParamsItemsZonesProxyReadTimeoutEditableTrue ZoneSettingEditParamsItemsZonesProxyReadTimeoutEditable = true - ZoneSettingEditParamsItemsZonesProxyReadTimeoutEditableFalse ZoneSettingEditParamsItemsZonesProxyReadTimeoutEditable = false -) - -// The value set for the Pseudo IPv4 setting. -type ZoneSettingEditParamsItemsZonesPseudoIpv4 struct { - // Value of the Pseudo IPv4 setting. - ID param.Field[ZoneSettingEditParamsItemsZonesPseudoIpv4ID] `json:"id"` - // Value of the Pseudo IPv4 setting. - Value param.Field[ZoneSettingEditParamsItemsZonesPseudoIpv4Value] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesPseudoIpv4) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesPseudoIpv4) implementsZoneSettingEditParamsItem() {} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingEditParamsItemsZonesPseudoIpv4ID string - -const ( - ZoneSettingEditParamsItemsZonesPseudoIpv4IDPseudoIpv4 ZoneSettingEditParamsItemsZonesPseudoIpv4ID = "pseudo_ipv4" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesPseudoIpv4Editable bool - -const ( - ZoneSettingEditParamsItemsZonesPseudoIpv4EditableTrue ZoneSettingEditParamsItemsZonesPseudoIpv4Editable = true - ZoneSettingEditParamsItemsZonesPseudoIpv4EditableFalse ZoneSettingEditParamsItemsZonesPseudoIpv4Editable = false -) - -// Value of the Pseudo IPv4 setting. -type ZoneSettingEditParamsItemsZonesPseudoIpv4Value string - -const ( - ZoneSettingEditParamsItemsZonesPseudoIpv4ValueOff ZoneSettingEditParamsItemsZonesPseudoIpv4Value = "off" - ZoneSettingEditParamsItemsZonesPseudoIpv4ValueAddHeader ZoneSettingEditParamsItemsZonesPseudoIpv4Value = "add_header" - ZoneSettingEditParamsItemsZonesPseudoIpv4ValueOverwriteHeader ZoneSettingEditParamsItemsZonesPseudoIpv4Value = "overwrite_header" -) - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -type ZoneSettingEditParamsItemsZonesResponseBuffering struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesResponseBufferingID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesResponseBufferingValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesResponseBuffering) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesResponseBuffering) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesResponseBufferingID string - -const ( - ZoneSettingEditParamsItemsZonesResponseBufferingIDResponseBuffering ZoneSettingEditParamsItemsZonesResponseBufferingID = "response_buffering" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesResponseBufferingEditable bool - -const ( - ZoneSettingEditParamsItemsZonesResponseBufferingEditableTrue ZoneSettingEditParamsItemsZonesResponseBufferingEditable = true - ZoneSettingEditParamsItemsZonesResponseBufferingEditableFalse ZoneSettingEditParamsItemsZonesResponseBufferingEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesResponseBufferingValue string - -const ( - ZoneSettingEditParamsItemsZonesResponseBufferingValueOn ZoneSettingEditParamsItemsZonesResponseBufferingValue = "on" - ZoneSettingEditParamsItemsZonesResponseBufferingValueOff ZoneSettingEditParamsItemsZonesResponseBufferingValue = "off" -) - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingEditParamsItemsZonesRocketLoader struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesRocketLoaderID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesRocketLoaderValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesRocketLoader) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesRocketLoader) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesRocketLoaderID string - -const ( - ZoneSettingEditParamsItemsZonesRocketLoaderIDRocketLoader ZoneSettingEditParamsItemsZonesRocketLoaderID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesRocketLoaderEditable bool - -const ( - ZoneSettingEditParamsItemsZonesRocketLoaderEditableTrue ZoneSettingEditParamsItemsZonesRocketLoaderEditable = true - ZoneSettingEditParamsItemsZonesRocketLoaderEditableFalse ZoneSettingEditParamsItemsZonesRocketLoaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesRocketLoaderValue string - -const ( - ZoneSettingEditParamsItemsZonesRocketLoaderValueOn ZoneSettingEditParamsItemsZonesRocketLoaderValue = "on" - ZoneSettingEditParamsItemsZonesRocketLoaderValueOff ZoneSettingEditParamsItemsZonesRocketLoaderValue = "off" -) - -// [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) -// serves your WordPress site from Cloudflare's edge network and caches third-party -// fonts. -type ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimization struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationID] `json:"id"` - Value param.Field[ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimization) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimization) implementsZoneSettingEditParamsItem() { -} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationID string - -const ( - ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationIDAutomaticPlatformOptimization ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationID = "automatic_platform_optimization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationEditableTrue ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationEditable = true - ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationEditableFalse ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationEditable = false -) - -type ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationValue struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType param.Field[bool] `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf param.Field[bool] `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled param.Field[bool] `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames param.Field[[]string] `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress param.Field[bool] `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin param.Field[bool] `json:"wp_plugin,required"` -} - -func (r ZoneSettingEditParamsItemsZonesSchemasAutomaticPlatformOptimizationValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Cloudflare security header for a zone. -type ZoneSettingEditParamsItemsZonesSecurityHeader struct { - // ID of the zone's security header. - ID param.Field[ZoneSettingEditParamsItemsZonesSecurityHeaderID] `json:"id"` - Value param.Field[ZoneSettingEditParamsItemsZonesSecurityHeaderValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSecurityHeader) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSecurityHeader) implementsZoneSettingEditParamsItem() {} - -// ID of the zone's security header. -type ZoneSettingEditParamsItemsZonesSecurityHeaderID string - -const ( - ZoneSettingEditParamsItemsZonesSecurityHeaderIDSecurityHeader ZoneSettingEditParamsItemsZonesSecurityHeaderID = "security_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSecurityHeaderEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSecurityHeaderEditableTrue ZoneSettingEditParamsItemsZonesSecurityHeaderEditable = true - ZoneSettingEditParamsItemsZonesSecurityHeaderEditableFalse ZoneSettingEditParamsItemsZonesSecurityHeaderEditable = false -) - -type ZoneSettingEditParamsItemsZonesSecurityHeaderValue struct { - // Strict Transport Security. - StrictTransportSecurity param.Field[ZoneSettingEditParamsItemsZonesSecurityHeaderValueStrictTransportSecurity] `json:"strict_transport_security"` -} - -func (r ZoneSettingEditParamsItemsZonesSecurityHeaderValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Strict Transport Security. -type ZoneSettingEditParamsItemsZonesSecurityHeaderValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled param.Field[bool] `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains param.Field[bool] `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge param.Field[float64] `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff param.Field[bool] `json:"nosniff"` -} - -func (r ZoneSettingEditParamsItemsZonesSecurityHeaderValueStrictTransportSecurity) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -type ZoneSettingEditParamsItemsZonesSecurityLevel struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesSecurityLevelID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesSecurityLevelValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSecurityLevel) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSecurityLevel) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesSecurityLevelID string - -const ( - ZoneSettingEditParamsItemsZonesSecurityLevelIDSecurityLevel ZoneSettingEditParamsItemsZonesSecurityLevelID = "security_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSecurityLevelEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSecurityLevelEditableTrue ZoneSettingEditParamsItemsZonesSecurityLevelEditable = true - ZoneSettingEditParamsItemsZonesSecurityLevelEditableFalse ZoneSettingEditParamsItemsZonesSecurityLevelEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesSecurityLevelValue string - -const ( - ZoneSettingEditParamsItemsZonesSecurityLevelValueOff ZoneSettingEditParamsItemsZonesSecurityLevelValue = "off" - ZoneSettingEditParamsItemsZonesSecurityLevelValueEssentiallyOff ZoneSettingEditParamsItemsZonesSecurityLevelValue = "essentially_off" - ZoneSettingEditParamsItemsZonesSecurityLevelValueLow ZoneSettingEditParamsItemsZonesSecurityLevelValue = "low" - ZoneSettingEditParamsItemsZonesSecurityLevelValueMedium ZoneSettingEditParamsItemsZonesSecurityLevelValue = "medium" - ZoneSettingEditParamsItemsZonesSecurityLevelValueHigh ZoneSettingEditParamsItemsZonesSecurityLevelValue = "high" - ZoneSettingEditParamsItemsZonesSecurityLevelValueUnderAttack ZoneSettingEditParamsItemsZonesSecurityLevelValue = "under_attack" -) - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -type ZoneSettingEditParamsItemsZonesServerSideExclude struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesServerSideExcludeID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesServerSideExcludeValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesServerSideExclude) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesServerSideExclude) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesServerSideExcludeID string - -const ( - ZoneSettingEditParamsItemsZonesServerSideExcludeIDServerSideExclude ZoneSettingEditParamsItemsZonesServerSideExcludeID = "server_side_exclude" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesServerSideExcludeEditable bool - -const ( - ZoneSettingEditParamsItemsZonesServerSideExcludeEditableTrue ZoneSettingEditParamsItemsZonesServerSideExcludeEditable = true - ZoneSettingEditParamsItemsZonesServerSideExcludeEditableFalse ZoneSettingEditParamsItemsZonesServerSideExcludeEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesServerSideExcludeValue string - -const ( - ZoneSettingEditParamsItemsZonesServerSideExcludeValueOn ZoneSettingEditParamsItemsZonesServerSideExcludeValue = "on" - ZoneSettingEditParamsItemsZonesServerSideExcludeValueOff ZoneSettingEditParamsItemsZonesServerSideExcludeValue = "off" -) - -// Allow SHA1 support. -type ZoneSettingEditParamsItemsZonesSha1Support struct { - // Zone setting identifier. - ID param.Field[ZoneSettingEditParamsItemsZonesSha1SupportID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesSha1SupportValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSha1Support) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSha1Support) implementsZoneSettingEditParamsItem() {} - -// Zone setting identifier. -type ZoneSettingEditParamsItemsZonesSha1SupportID string - -const ( - ZoneSettingEditParamsItemsZonesSha1SupportIDSha1Support ZoneSettingEditParamsItemsZonesSha1SupportID = "sha1_support" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSha1SupportEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSha1SupportEditableTrue ZoneSettingEditParamsItemsZonesSha1SupportEditable = true - ZoneSettingEditParamsItemsZonesSha1SupportEditableFalse ZoneSettingEditParamsItemsZonesSha1SupportEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesSha1SupportValue string - -const ( - ZoneSettingEditParamsItemsZonesSha1SupportValueOff ZoneSettingEditParamsItemsZonesSha1SupportValue = "off" - ZoneSettingEditParamsItemsZonesSha1SupportValueOn ZoneSettingEditParamsItemsZonesSha1SupportValue = "on" -) - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -type ZoneSettingEditParamsItemsZonesSortQueryStringForCache struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesSortQueryStringForCacheID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSortQueryStringForCache) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSortQueryStringForCache) implementsZoneSettingEditParamsItem() { -} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesSortQueryStringForCacheID string - -const ( - ZoneSettingEditParamsItemsZonesSortQueryStringForCacheIDSortQueryStringForCache ZoneSettingEditParamsItemsZonesSortQueryStringForCacheID = "sort_query_string_for_cache" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSortQueryStringForCacheEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSortQueryStringForCacheEditableTrue ZoneSettingEditParamsItemsZonesSortQueryStringForCacheEditable = true - ZoneSettingEditParamsItemsZonesSortQueryStringForCacheEditableFalse ZoneSettingEditParamsItemsZonesSortQueryStringForCacheEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValue string - -const ( - ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValueOn ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValue = "on" - ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValueOff ZoneSettingEditParamsItemsZonesSortQueryStringForCacheValue = "off" -) - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -type ZoneSettingEditParamsItemsZonesSSL struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesSSLID] `json:"id"` - // Value of the zone setting. Notes: Depends on the zone's plan level - Value param.Field[ZoneSettingEditParamsItemsZonesSSLValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesSSL) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSSL) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesSSLID string - -const ( - ZoneSettingEditParamsItemsZonesSSLIDSSL ZoneSettingEditParamsItemsZonesSSLID = "ssl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesSSLEditable bool - -const ( - ZoneSettingEditParamsItemsZonesSSLEditableTrue ZoneSettingEditParamsItemsZonesSSLEditable = true - ZoneSettingEditParamsItemsZonesSSLEditableFalse ZoneSettingEditParamsItemsZonesSSLEditable = false -) - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingEditParamsItemsZonesSSLValue string - -const ( - ZoneSettingEditParamsItemsZonesSSLValueOff ZoneSettingEditParamsItemsZonesSSLValue = "off" - ZoneSettingEditParamsItemsZonesSSLValueFlexible ZoneSettingEditParamsItemsZonesSSLValue = "flexible" - ZoneSettingEditParamsItemsZonesSSLValueFull ZoneSettingEditParamsItemsZonesSSLValue = "full" - ZoneSettingEditParamsItemsZonesSSLValueStrict ZoneSettingEditParamsItemsZonesSSLValue = "strict" -) - -type ZoneSettingEditParamsItemsZonesSSLRecommender struct { - // Enrollment value for SSL/TLS Recommender. - ID param.Field[ZoneSettingEditParamsItemsZonesSSLRecommenderID] `json:"id"` - // ssl-recommender enrollment setting. - Enabled param.Field[bool] `json:"enabled"` -} - -func (r ZoneSettingEditParamsItemsZonesSSLRecommender) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesSSLRecommender) implementsZoneSettingEditParamsItem() {} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingEditParamsItemsZonesSSLRecommenderID string - -const ( - ZoneSettingEditParamsItemsZonesSSLRecommenderIDSSLRecommender ZoneSettingEditParamsItemsZonesSSLRecommenderID = "ssl_recommender" -) - -// Only allows TLS1.2. -type ZoneSettingEditParamsItemsZonesTLS1_2Only struct { - // Zone setting identifier. - ID param.Field[ZoneSettingEditParamsItemsZonesTLS1_2OnlyID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesTLS1_2OnlyValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesTLS1_2Only) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesTLS1_2Only) implementsZoneSettingEditParamsItem() {} - -// Zone setting identifier. -type ZoneSettingEditParamsItemsZonesTLS1_2OnlyID string - -const ( - ZoneSettingEditParamsItemsZonesTLS1_2OnlyIDTLS1_2Only ZoneSettingEditParamsItemsZonesTLS1_2OnlyID = "tls_1_2_only" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesTLS1_2OnlyEditable bool - -const ( - ZoneSettingEditParamsItemsZonesTLS1_2OnlyEditableTrue ZoneSettingEditParamsItemsZonesTLS1_2OnlyEditable = true - ZoneSettingEditParamsItemsZonesTLS1_2OnlyEditableFalse ZoneSettingEditParamsItemsZonesTLS1_2OnlyEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesTLS1_2OnlyValue string - -const ( - ZoneSettingEditParamsItemsZonesTLS1_2OnlyValueOff ZoneSettingEditParamsItemsZonesTLS1_2OnlyValue = "off" - ZoneSettingEditParamsItemsZonesTLS1_2OnlyValueOn ZoneSettingEditParamsItemsZonesTLS1_2OnlyValue = "on" -) - -// Enables Crypto TLS 1.3 feature for a zone. -type ZoneSettingEditParamsItemsZonesTLS1_3 struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesTLS1_3ID] `json:"id"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingEditParamsItemsZonesTLS1_3Value] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesTLS1_3) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesTLS1_3) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesTLS1_3ID string - -const ( - ZoneSettingEditParamsItemsZonesTLS1_3IDTLS1_3 ZoneSettingEditParamsItemsZonesTLS1_3ID = "tls_1_3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesTLS1_3Editable bool - -const ( - ZoneSettingEditParamsItemsZonesTLS1_3EditableTrue ZoneSettingEditParamsItemsZonesTLS1_3Editable = true - ZoneSettingEditParamsItemsZonesTLS1_3EditableFalse ZoneSettingEditParamsItemsZonesTLS1_3Editable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingEditParamsItemsZonesTLS1_3Value string - -const ( - ZoneSettingEditParamsItemsZonesTLS1_3ValueOn ZoneSettingEditParamsItemsZonesTLS1_3Value = "on" - ZoneSettingEditParamsItemsZonesTLS1_3ValueOff ZoneSettingEditParamsItemsZonesTLS1_3Value = "off" - ZoneSettingEditParamsItemsZonesTLS1_3ValueZrt ZoneSettingEditParamsItemsZonesTLS1_3Value = "zrt" -) - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -type ZoneSettingEditParamsItemsZonesTLSClientAuth struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesTLSClientAuthID] `json:"id"` - // value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesTLSClientAuthValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesTLSClientAuth) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesTLSClientAuth) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesTLSClientAuthID string - -const ( - ZoneSettingEditParamsItemsZonesTLSClientAuthIDTLSClientAuth ZoneSettingEditParamsItemsZonesTLSClientAuthID = "tls_client_auth" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesTLSClientAuthEditable bool - -const ( - ZoneSettingEditParamsItemsZonesTLSClientAuthEditableTrue ZoneSettingEditParamsItemsZonesTLSClientAuthEditable = true - ZoneSettingEditParamsItemsZonesTLSClientAuthEditableFalse ZoneSettingEditParamsItemsZonesTLSClientAuthEditable = false -) - -// value of the zone setting. -type ZoneSettingEditParamsItemsZonesTLSClientAuthValue string - -const ( - ZoneSettingEditParamsItemsZonesTLSClientAuthValueOn ZoneSettingEditParamsItemsZonesTLSClientAuthValue = "on" - ZoneSettingEditParamsItemsZonesTLSClientAuthValueOff ZoneSettingEditParamsItemsZonesTLSClientAuthValue = "off" -) - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -type ZoneSettingEditParamsItemsZonesTrueClientIPHeader struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesTrueClientIPHeaderID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesTrueClientIPHeader) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesTrueClientIPHeader) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesTrueClientIPHeaderID string - -const ( - ZoneSettingEditParamsItemsZonesTrueClientIPHeaderIDTrueClientIPHeader ZoneSettingEditParamsItemsZonesTrueClientIPHeaderID = "true_client_ip_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesTrueClientIPHeaderEditable bool - -const ( - ZoneSettingEditParamsItemsZonesTrueClientIPHeaderEditableTrue ZoneSettingEditParamsItemsZonesTrueClientIPHeaderEditable = true - ZoneSettingEditParamsItemsZonesTrueClientIPHeaderEditableFalse ZoneSettingEditParamsItemsZonesTrueClientIPHeaderEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValue string - -const ( - ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValueOn ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValue = "on" - ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValueOff ZoneSettingEditParamsItemsZonesTrueClientIPHeaderValue = "off" -) - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -type ZoneSettingEditParamsItemsZonesWAF struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesWAFID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesWAFValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesWAF) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesWAF) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesWAFID string - -const ( - ZoneSettingEditParamsItemsZonesWAFIDWAF ZoneSettingEditParamsItemsZonesWAFID = "waf" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesWAFEditable bool - -const ( - ZoneSettingEditParamsItemsZonesWAFEditableTrue ZoneSettingEditParamsItemsZonesWAFEditable = true - ZoneSettingEditParamsItemsZonesWAFEditableFalse ZoneSettingEditParamsItemsZonesWAFEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesWAFValue string - -const ( - ZoneSettingEditParamsItemsZonesWAFValueOn ZoneSettingEditParamsItemsZonesWAFValue = "on" - ZoneSettingEditParamsItemsZonesWAFValueOff ZoneSettingEditParamsItemsZonesWAFValue = "off" -) - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -type ZoneSettingEditParamsItemsZonesWebp struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesWebpID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesWebpValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesWebp) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesWebp) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesWebpID string - -const ( - ZoneSettingEditParamsItemsZonesWebpIDWebp ZoneSettingEditParamsItemsZonesWebpID = "webp" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesWebpEditable bool - -const ( - ZoneSettingEditParamsItemsZonesWebpEditableTrue ZoneSettingEditParamsItemsZonesWebpEditable = true - ZoneSettingEditParamsItemsZonesWebpEditableFalse ZoneSettingEditParamsItemsZonesWebpEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesWebpValue string - -const ( - ZoneSettingEditParamsItemsZonesWebpValueOff ZoneSettingEditParamsItemsZonesWebpValue = "off" - ZoneSettingEditParamsItemsZonesWebpValueOn ZoneSettingEditParamsItemsZonesWebpValue = "on" -) - -// WebSockets are open connections sustained between the client and the origin -// server. Inside a WebSockets connection, the client and the origin can pass data -// back and forth without having to reestablish sessions. This makes exchanging -// data within a WebSockets connection fast. WebSockets are often used for -// real-time applications such as live chat and gaming. For more information refer -// to -// [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). -type ZoneSettingEditParamsItemsZonesWebsockets struct { - // ID of the zone setting. - ID param.Field[ZoneSettingEditParamsItemsZonesWebsocketsID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingEditParamsItemsZonesWebsocketsValue] `json:"value"` -} - -func (r ZoneSettingEditParamsItemsZonesWebsockets) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ZoneSettingEditParamsItemsZonesWebsockets) implementsZoneSettingEditParamsItem() {} - -// ID of the zone setting. -type ZoneSettingEditParamsItemsZonesWebsocketsID string - -const ( - ZoneSettingEditParamsItemsZonesWebsocketsIDWebsockets ZoneSettingEditParamsItemsZonesWebsocketsID = "websockets" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEditParamsItemsZonesWebsocketsEditable bool - -const ( - ZoneSettingEditParamsItemsZonesWebsocketsEditableTrue ZoneSettingEditParamsItemsZonesWebsocketsEditable = true - ZoneSettingEditParamsItemsZonesWebsocketsEditableFalse ZoneSettingEditParamsItemsZonesWebsocketsEditable = false -) - -// Value of the zone setting. -type ZoneSettingEditParamsItemsZonesWebsocketsValue string - -const ( - ZoneSettingEditParamsItemsZonesWebsocketsValueOff ZoneSettingEditParamsItemsZonesWebsocketsValue = "off" - ZoneSettingEditParamsItemsZonesWebsocketsValueOn ZoneSettingEditParamsItemsZonesWebsocketsValue = "on" -) diff --git a/zonesetting_test.go b/zonesetting_test.go deleted file mode 100644 index ae723defade..00000000000 --- a/zonesetting_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingEdit(t *testing.T) { - t.Skip("oneOf doesnt match") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Edit( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingEditParams{ - Items: cloudflare.F([]cloudflare.ZoneSettingEditParamsItem{cloudflare.ZoneSettingEditParamsItemsZonesAlwaysOnline(cloudflare.ZoneSettingEditParamsItemsZonesAlwaysOnline{ - ID: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesAlwaysOnlineIDAlwaysOnline), - Value: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesAlwaysOnlineValueOn), - }), cloudflare.ZoneSettingEditParamsItemsZonesBrowserCacheTTL(cloudflare.ZoneSettingEditParamsItemsZonesBrowserCacheTTL{ - ID: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesBrowserCacheTTLIDBrowserCacheTTL), - Value: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesBrowserCacheTTLValue18000), - }), cloudflare.ZoneSettingEditParamsItemsZonesIPGeolocation(cloudflare.ZoneSettingEditParamsItemsZonesIPGeolocation{ - ID: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesIPGeolocationIDIPGeolocation), - Value: cloudflare.F(cloudflare.ZoneSettingEditParamsItemsZonesIPGeolocationValueOff), - })}), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingadvancedddos.go b/zonesettingadvancedddos.go deleted file mode 100644 index 25b65f5f88b..00000000000 --- a/zonesettingadvancedddos.go +++ /dev/null @@ -1,162 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingAdvancedDDOSService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingAdvancedDDOSService] method instead. -type ZoneSettingAdvancedDDOSService struct { - Options []option.RequestOption -} - -// NewZoneSettingAdvancedDDOSService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingAdvancedDDOSService(opts ...option.RequestOption) (r *ZoneSettingAdvancedDDOSService) { - r = &ZoneSettingAdvancedDDOSService{} - r.Options = opts - return -} - -// Advanced protection from Distributed Denial of Service (DDoS) attacks on your -// website. This is an uneditable value that is 'on' in the case of Business and -// Enterprise zones. -func (r *ZoneSettingAdvancedDDOSService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingAdvancedDDOSListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/advanced_ddos", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingAdvancedDDOSListResponse struct { - Errors []ZoneSettingAdvancedDDOSListResponseError `json:"errors"` - Messages []ZoneSettingAdvancedDDOSListResponseMessage `json:"messages"` - // Advanced protection from Distributed Denial of Service (DDoS) attacks on your - // website. This is an uneditable value that is 'on' in the case of Business and - // Enterprise zones. - Result ZoneSettingAdvancedDDOSListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAdvancedDDOSListResponseJSON `json:"-"` -} - -// zoneSettingAdvancedDDOSListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingAdvancedDDOSListResponse] -type zoneSettingAdvancedDDOSListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAdvancedDDOSListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAdvancedDDOSListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAdvancedDDOSListResponseErrorJSON `json:"-"` -} - -// zoneSettingAdvancedDDOSListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingAdvancedDDOSListResponseError] -type zoneSettingAdvancedDDOSListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAdvancedDDOSListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAdvancedDDOSListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAdvancedDDOSListResponseMessageJSON `json:"-"` -} - -// zoneSettingAdvancedDDOSListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingAdvancedDDOSListResponseMessage] -type zoneSettingAdvancedDDOSListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAdvancedDDOSListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Advanced protection from Distributed Denial of Service (DDoS) attacks on your -// website. This is an uneditable value that is 'on' in the case of Business and -// Enterprise zones. -type ZoneSettingAdvancedDDOSListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAdvancedDDOSListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAdvancedDDOSListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Defaults to on for Business+ plans - Value ZoneSettingAdvancedDDOSListResponseResultValue `json:"value"` - JSON zoneSettingAdvancedDDOSListResponseResultJSON `json:"-"` -} - -// zoneSettingAdvancedDDOSListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingAdvancedDDOSListResponseResult] -type zoneSettingAdvancedDDOSListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAdvancedDDOSListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAdvancedDDOSListResponseResultID string - -const ( - ZoneSettingAdvancedDDOSListResponseResultIDAdvancedDDOS ZoneSettingAdvancedDDOSListResponseResultID = "advanced_ddos" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAdvancedDDOSListResponseResultEditable bool - -const ( - ZoneSettingAdvancedDDOSListResponseResultEditableTrue ZoneSettingAdvancedDDOSListResponseResultEditable = true - ZoneSettingAdvancedDDOSListResponseResultEditableFalse ZoneSettingAdvancedDDOSListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Defaults to on for Business+ plans -type ZoneSettingAdvancedDDOSListResponseResultValue string - -const ( - ZoneSettingAdvancedDDOSListResponseResultValueOn ZoneSettingAdvancedDDOSListResponseResultValue = "on" - ZoneSettingAdvancedDDOSListResponseResultValueOff ZoneSettingAdvancedDDOSListResponseResultValue = "off" -) diff --git a/zonesettingalwaysonline.go b/zonesettingalwaysonline.go deleted file mode 100644 index 141b65b70ba..00000000000 --- a/zonesettingalwaysonline.go +++ /dev/null @@ -1,322 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingAlwaysOnlineService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingAlwaysOnlineService] method instead. -type ZoneSettingAlwaysOnlineService struct { - Options []option.RequestOption -} - -// NewZoneSettingAlwaysOnlineService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingAlwaysOnlineService(opts ...option.RequestOption) (r *ZoneSettingAlwaysOnlineService) { - r = &ZoneSettingAlwaysOnlineService{} - r.Options = opts - return -} - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -func (r *ZoneSettingAlwaysOnlineService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingAlwaysOnlineGetResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/always_online", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -func (r *ZoneSettingAlwaysOnlineService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingAlwaysOnlineUpdateParams, opts ...option.RequestOption) (res *ZoneSettingAlwaysOnlineUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/always_online", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -type ZoneSettingAlwaysOnlineGetResponse struct { - Errors []ZoneSettingAlwaysOnlineGetResponseError `json:"errors"` - Messages []ZoneSettingAlwaysOnlineGetResponseMessage `json:"messages"` - // When enabled, Cloudflare serves limited copies of web pages available from the - // [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - // offline. Refer to - // [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - // more information. - Result ZoneSettingAlwaysOnlineGetResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAlwaysOnlineGetResponseJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineGetResponseJSON contains the JSON metadata for the struct -// [ZoneSettingAlwaysOnlineGetResponse] -type zoneSettingAlwaysOnlineGetResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysOnlineGetResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysOnlineGetResponseErrorJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineGetResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysOnlineGetResponseError] -type zoneSettingAlwaysOnlineGetResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineGetResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysOnlineGetResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysOnlineGetResponseMessageJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineGetResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysOnlineGetResponseMessage] -type zoneSettingAlwaysOnlineGetResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineGetResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -type ZoneSettingAlwaysOnlineGetResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAlwaysOnlineGetResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAlwaysOnlineGetResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingAlwaysOnlineGetResponseResultValue `json:"value"` - JSON zoneSettingAlwaysOnlineGetResponseResultJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineGetResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysOnlineGetResponseResult] -type zoneSettingAlwaysOnlineGetResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineGetResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAlwaysOnlineGetResponseResultID string - -const ( - ZoneSettingAlwaysOnlineGetResponseResultIDAlwaysOnline ZoneSettingAlwaysOnlineGetResponseResultID = "always_online" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAlwaysOnlineGetResponseResultEditable bool - -const ( - ZoneSettingAlwaysOnlineGetResponseResultEditableTrue ZoneSettingAlwaysOnlineGetResponseResultEditable = true - ZoneSettingAlwaysOnlineGetResponseResultEditableFalse ZoneSettingAlwaysOnlineGetResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingAlwaysOnlineGetResponseResultValue string - -const ( - ZoneSettingAlwaysOnlineGetResponseResultValueOn ZoneSettingAlwaysOnlineGetResponseResultValue = "on" - ZoneSettingAlwaysOnlineGetResponseResultValueOff ZoneSettingAlwaysOnlineGetResponseResultValue = "off" -) - -type ZoneSettingAlwaysOnlineUpdateResponse struct { - Errors []ZoneSettingAlwaysOnlineUpdateResponseError `json:"errors"` - Messages []ZoneSettingAlwaysOnlineUpdateResponseMessage `json:"messages"` - // When enabled, Cloudflare serves limited copies of web pages available from the - // [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is - // offline. Refer to - // [Always Online](https://developers.cloudflare.com/cache/about/always-online) for - // more information. - Result ZoneSettingAlwaysOnlineUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAlwaysOnlineUpdateResponseJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysOnlineUpdateResponse] -type zoneSettingAlwaysOnlineUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysOnlineUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysOnlineUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysOnlineUpdateResponseError] -type zoneSettingAlwaysOnlineUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysOnlineUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysOnlineUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysOnlineUpdateResponseMessage] -type zoneSettingAlwaysOnlineUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, Cloudflare serves limited copies of web pages available from the -// [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is -// offline. Refer to -// [Always Online](https://developers.cloudflare.com/cache/about/always-online) for -// more information. -type ZoneSettingAlwaysOnlineUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAlwaysOnlineUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAlwaysOnlineUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingAlwaysOnlineUpdateResponseResultValue `json:"value"` - JSON zoneSettingAlwaysOnlineUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingAlwaysOnlineUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysOnlineUpdateResponseResult] -type zoneSettingAlwaysOnlineUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysOnlineUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAlwaysOnlineUpdateResponseResultID string - -const ( - ZoneSettingAlwaysOnlineUpdateResponseResultIDAlwaysOnline ZoneSettingAlwaysOnlineUpdateResponseResultID = "always_online" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAlwaysOnlineUpdateResponseResultEditable bool - -const ( - ZoneSettingAlwaysOnlineUpdateResponseResultEditableTrue ZoneSettingAlwaysOnlineUpdateResponseResultEditable = true - ZoneSettingAlwaysOnlineUpdateResponseResultEditableFalse ZoneSettingAlwaysOnlineUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingAlwaysOnlineUpdateResponseResultValue string - -const ( - ZoneSettingAlwaysOnlineUpdateResponseResultValueOn ZoneSettingAlwaysOnlineUpdateResponseResultValue = "on" - ZoneSettingAlwaysOnlineUpdateResponseResultValueOff ZoneSettingAlwaysOnlineUpdateResponseResultValue = "off" -) - -type ZoneSettingAlwaysOnlineUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingAlwaysOnlineUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingAlwaysOnlineUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingAlwaysOnlineUpdateParamsValue string - -const ( - ZoneSettingAlwaysOnlineUpdateParamsValueOn ZoneSettingAlwaysOnlineUpdateParamsValue = "on" - ZoneSettingAlwaysOnlineUpdateParamsValueOff ZoneSettingAlwaysOnlineUpdateParamsValue = "off" -) diff --git a/zonesettingalwaysonline_test.go b/zonesettingalwaysonline_test.go deleted file mode 100644 index 652f345df9b..00000000000 --- a/zonesettingalwaysonline_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingAlwaysOnlineGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AlwaysOnline.Get(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingAlwaysOnlineUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AlwaysOnline.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingAlwaysOnlineUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingAlwaysOnlineUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingalwaysusehttp.go b/zonesettingalwaysusehttp.go deleted file mode 100644 index ffb3beabfe7..00000000000 --- a/zonesettingalwaysusehttp.go +++ /dev/null @@ -1,310 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingAlwaysUseHTTPService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingAlwaysUseHTTPService] method instead. -type ZoneSettingAlwaysUseHTTPService struct { - Options []option.RequestOption -} - -// NewZoneSettingAlwaysUseHTTPService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingAlwaysUseHTTPService(opts ...option.RequestOption) (r *ZoneSettingAlwaysUseHTTPService) { - r = &ZoneSettingAlwaysUseHTTPService{} - r.Options = opts - return -} - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -func (r *ZoneSettingAlwaysUseHTTPService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingAlwaysUseHTTPUpdateParams, opts ...option.RequestOption) (res *ZoneSettingAlwaysUseHTTPUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/always_use_https", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -func (r *ZoneSettingAlwaysUseHTTPService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingAlwaysUseHTTPListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/always_use_https", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingAlwaysUseHTTPUpdateResponse struct { - Errors []ZoneSettingAlwaysUseHTTPUpdateResponseError `json:"errors"` - Messages []ZoneSettingAlwaysUseHTTPUpdateResponseMessage `json:"messages"` - // Reply to all requests for URLs that use "http" with a 301 redirect to the - // equivalent "https" URL. If you only want to redirect for a subset of requests, - // consider creating an "Always use HTTPS" page rule. - Result ZoneSettingAlwaysUseHTTPUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAlwaysUseHTTPUpdateResponseJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysUseHTTPUpdateResponse] -type zoneSettingAlwaysUseHTTPUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysUseHTTPUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysUseHTTPUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysUseHTTPUpdateResponseError] -type zoneSettingAlwaysUseHTTPUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysUseHTTPUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysUseHTTPUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysUseHTTPUpdateResponseMessage] -type zoneSettingAlwaysUseHTTPUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -type ZoneSettingAlwaysUseHTTPUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAlwaysUseHTTPUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAlwaysUseHTTPUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingAlwaysUseHTTPUpdateResponseResultValue `json:"value"` - JSON zoneSettingAlwaysUseHTTPUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysUseHTTPUpdateResponseResult] -type zoneSettingAlwaysUseHTTPUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAlwaysUseHTTPUpdateResponseResultID string - -const ( - ZoneSettingAlwaysUseHTTPUpdateResponseResultIDAlwaysUseHTTPs ZoneSettingAlwaysUseHTTPUpdateResponseResultID = "always_use_https" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAlwaysUseHTTPUpdateResponseResultEditable bool - -const ( - ZoneSettingAlwaysUseHTTPUpdateResponseResultEditableTrue ZoneSettingAlwaysUseHTTPUpdateResponseResultEditable = true - ZoneSettingAlwaysUseHTTPUpdateResponseResultEditableFalse ZoneSettingAlwaysUseHTTPUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingAlwaysUseHTTPUpdateResponseResultValue string - -const ( - ZoneSettingAlwaysUseHTTPUpdateResponseResultValueOn ZoneSettingAlwaysUseHTTPUpdateResponseResultValue = "on" - ZoneSettingAlwaysUseHTTPUpdateResponseResultValueOff ZoneSettingAlwaysUseHTTPUpdateResponseResultValue = "off" -) - -type ZoneSettingAlwaysUseHTTPListResponse struct { - Errors []ZoneSettingAlwaysUseHTTPListResponseError `json:"errors"` - Messages []ZoneSettingAlwaysUseHTTPListResponseMessage `json:"messages"` - // Reply to all requests for URLs that use "http" with a 301 redirect to the - // equivalent "https" URL. If you only want to redirect for a subset of requests, - // consider creating an "Always use HTTPS" page rule. - Result ZoneSettingAlwaysUseHTTPListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAlwaysUseHTTPListResponseJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysUseHTTPListResponse] -type zoneSettingAlwaysUseHTTPListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysUseHTTPListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysUseHTTPListResponseErrorJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingAlwaysUseHTTPListResponseError] -type zoneSettingAlwaysUseHTTPListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAlwaysUseHTTPListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAlwaysUseHTTPListResponseMessageJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysUseHTTPListResponseMessage] -type zoneSettingAlwaysUseHTTPListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Reply to all requests for URLs that use "http" with a 301 redirect to the -// equivalent "https" URL. If you only want to redirect for a subset of requests, -// consider creating an "Always use HTTPS" page rule. -type ZoneSettingAlwaysUseHTTPListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAlwaysUseHTTPListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAlwaysUseHTTPListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingAlwaysUseHTTPListResponseResultValue `json:"value"` - JSON zoneSettingAlwaysUseHTTPListResponseResultJSON `json:"-"` -} - -// zoneSettingAlwaysUseHTTPListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingAlwaysUseHTTPListResponseResult] -type zoneSettingAlwaysUseHTTPListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAlwaysUseHTTPListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAlwaysUseHTTPListResponseResultID string - -const ( - ZoneSettingAlwaysUseHTTPListResponseResultIDAlwaysUseHTTPs ZoneSettingAlwaysUseHTTPListResponseResultID = "always_use_https" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAlwaysUseHTTPListResponseResultEditable bool - -const ( - ZoneSettingAlwaysUseHTTPListResponseResultEditableTrue ZoneSettingAlwaysUseHTTPListResponseResultEditable = true - ZoneSettingAlwaysUseHTTPListResponseResultEditableFalse ZoneSettingAlwaysUseHTTPListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingAlwaysUseHTTPListResponseResultValue string - -const ( - ZoneSettingAlwaysUseHTTPListResponseResultValueOn ZoneSettingAlwaysUseHTTPListResponseResultValue = "on" - ZoneSettingAlwaysUseHTTPListResponseResultValueOff ZoneSettingAlwaysUseHTTPListResponseResultValue = "off" -) - -type ZoneSettingAlwaysUseHTTPUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingAlwaysUseHTTPUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingAlwaysUseHTTPUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingAlwaysUseHTTPUpdateParamsValue string - -const ( - ZoneSettingAlwaysUseHTTPUpdateParamsValueOn ZoneSettingAlwaysUseHTTPUpdateParamsValue = "on" - ZoneSettingAlwaysUseHTTPUpdateParamsValueOff ZoneSettingAlwaysUseHTTPUpdateParamsValue = "off" -) diff --git a/zonesettingalwaysusehttp_test.go b/zonesettingalwaysusehttp_test.go deleted file mode 100644 index 8440ab65048..00000000000 --- a/zonesettingalwaysusehttp_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingAlwaysUseHTTPUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AlwaysUseHTTPs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingAlwaysUseHTTPUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingAlwaysUseHTTPUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingAlwaysUseHTTPList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AlwaysUseHTTPs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingautomatichttpsrewrite.go b/zonesettingautomatichttpsrewrite.go deleted file mode 100644 index 0f74765f1b7..00000000000 --- a/zonesettingautomatichttpsrewrite.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingAutomaticHTTPsRewriteService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingAutomaticHTTPsRewriteService] method instead. -type ZoneSettingAutomaticHTTPsRewriteService struct { - Options []option.RequestOption -} - -// NewZoneSettingAutomaticHTTPsRewriteService generates a new service that applies -// the given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingAutomaticHTTPsRewriteService(opts ...option.RequestOption) (r *ZoneSettingAutomaticHTTPsRewriteService) { - r = &ZoneSettingAutomaticHTTPsRewriteService{} - r.Options = opts - return -} - -// Enable the Automatic HTTPS Rewrites feature for this zone. -func (r *ZoneSettingAutomaticHTTPsRewriteService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingAutomaticHTTPsRewriteUpdateParams, opts ...option.RequestOption) (res *ZoneSettingAutomaticHTTPsRewriteUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/automatic_https_rewrites", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enable the Automatic HTTPS Rewrites feature for this zone. -func (r *ZoneSettingAutomaticHTTPsRewriteService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingAutomaticHTTPsRewriteListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/automatic_https_rewrites", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingAutomaticHTTPsRewriteUpdateResponse struct { - Errors []ZoneSettingAutomaticHTTPsRewriteUpdateResponseError `json:"errors"` - Messages []ZoneSettingAutomaticHTTPsRewriteUpdateResponseMessage `json:"messages"` - // Enable the Automatic HTTPS Rewrites feature for this zone. - Result ZoneSettingAutomaticHTTPsRewriteUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAutomaticHTTPsRewriteUpdateResponseJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteUpdateResponseJSON contains the JSON metadata -// for the struct [ZoneSettingAutomaticHTTPsRewriteUpdateResponse] -type zoneSettingAutomaticHTTPsRewriteUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticHTTPsRewriteUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteUpdateResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticHTTPsRewriteUpdateResponseError] -type zoneSettingAutomaticHTTPsRewriteUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticHTTPsRewriteUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteUpdateResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticHTTPsRewriteUpdateResponseMessage] -type zoneSettingAutomaticHTTPsRewriteUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable the Automatic HTTPS Rewrites feature for this zone. -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValue `json:"value"` - JSON zoneSettingAutomaticHTTPsRewriteUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteUpdateResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticHTTPsRewriteUpdateResponseResult] -type zoneSettingAutomaticHTTPsRewriteUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultID string - -const ( - ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultIDAutomaticHTTPsRewrites ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultID = "automatic_https_rewrites" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditable bool - -const ( - ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditableTrue ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditable = true - ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditableFalse ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValue string - -const ( - ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValueOn ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValue = "on" - ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValueOff ZoneSettingAutomaticHTTPsRewriteUpdateResponseResultValue = "off" -) - -type ZoneSettingAutomaticHTTPsRewriteListResponse struct { - Errors []ZoneSettingAutomaticHTTPsRewriteListResponseError `json:"errors"` - Messages []ZoneSettingAutomaticHTTPsRewriteListResponseMessage `json:"messages"` - // Enable the Automatic HTTPS Rewrites feature for this zone. - Result ZoneSettingAutomaticHTTPsRewriteListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAutomaticHTTPsRewriteListResponseJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteListResponseJSON contains the JSON metadata for -// the struct [ZoneSettingAutomaticHTTPsRewriteListResponse] -type zoneSettingAutomaticHTTPsRewriteListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticHTTPsRewriteListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticHTTPsRewriteListResponseErrorJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteListResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingAutomaticHTTPsRewriteListResponseError] -type zoneSettingAutomaticHTTPsRewriteListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticHTTPsRewriteListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticHTTPsRewriteListResponseMessageJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteListResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticHTTPsRewriteListResponseMessage] -type zoneSettingAutomaticHTTPsRewriteListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable the Automatic HTTPS Rewrites feature for this zone. -type ZoneSettingAutomaticHTTPsRewriteListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingAutomaticHTTPsRewriteListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingAutomaticHTTPsRewriteListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingAutomaticHTTPsRewriteListResponseResultValue `json:"value"` - JSON zoneSettingAutomaticHTTPsRewriteListResponseResultJSON `json:"-"` -} - -// zoneSettingAutomaticHTTPsRewriteListResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticHTTPsRewriteListResponseResult] -type zoneSettingAutomaticHTTPsRewriteListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticHTTPsRewriteListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingAutomaticHTTPsRewriteListResponseResultID string - -const ( - ZoneSettingAutomaticHTTPsRewriteListResponseResultIDAutomaticHTTPsRewrites ZoneSettingAutomaticHTTPsRewriteListResponseResultID = "automatic_https_rewrites" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingAutomaticHTTPsRewriteListResponseResultEditable bool - -const ( - ZoneSettingAutomaticHTTPsRewriteListResponseResultEditableTrue ZoneSettingAutomaticHTTPsRewriteListResponseResultEditable = true - ZoneSettingAutomaticHTTPsRewriteListResponseResultEditableFalse ZoneSettingAutomaticHTTPsRewriteListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingAutomaticHTTPsRewriteListResponseResultValue string - -const ( - ZoneSettingAutomaticHTTPsRewriteListResponseResultValueOn ZoneSettingAutomaticHTTPsRewriteListResponseResultValue = "on" - ZoneSettingAutomaticHTTPsRewriteListResponseResultValueOff ZoneSettingAutomaticHTTPsRewriteListResponseResultValue = "off" -) - -type ZoneSettingAutomaticHTTPsRewriteUpdateParams struct { - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingAutomaticHTTPsRewriteUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingAutomaticHTTPsRewriteUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingAutomaticHTTPsRewriteUpdateParamsValue string - -const ( - ZoneSettingAutomaticHTTPsRewriteUpdateParamsValueOn ZoneSettingAutomaticHTTPsRewriteUpdateParamsValue = "on" - ZoneSettingAutomaticHTTPsRewriteUpdateParamsValueOff ZoneSettingAutomaticHTTPsRewriteUpdateParamsValue = "off" -) diff --git a/zonesettingautomatichttpsrewrite_test.go b/zonesettingautomatichttpsrewrite_test.go deleted file mode 100644 index a616d426b4f..00000000000 --- a/zonesettingautomatichttpsrewrite_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingAutomaticHTTPsRewriteUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AutomaticHTTPsRewrites.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingAutomaticHTTPsRewriteUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingAutomaticHTTPsRewriteUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingAutomaticHTTPsRewriteList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AutomaticHTTPsRewrites.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingautomaticplatformoptimization.go b/zonesettingautomaticplatformoptimization.go deleted file mode 100644 index e21ffd0db82..00000000000 --- a/zonesettingautomaticplatformoptimization.go +++ /dev/null @@ -1,291 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingAutomaticPlatformOptimizationService contains methods and other -// services that help with interacting with the cloudflare API. Note, unlike -// clients, this service does not read variables from the environment -// automatically. You should not instantiate this service directly, and instead use -// the [NewZoneSettingAutomaticPlatformOptimizationService] method instead. -type ZoneSettingAutomaticPlatformOptimizationService struct { - Options []option.RequestOption -} - -// NewZoneSettingAutomaticPlatformOptimizationService generates a new service that -// applies the given options to each request. These options are applied after the -// parent client's options (if there is one), and before any request-specific -// options. -func NewZoneSettingAutomaticPlatformOptimizationService(opts ...option.RequestOption) (r *ZoneSettingAutomaticPlatformOptimizationService) { - r = &ZoneSettingAutomaticPlatformOptimizationService{} - r.Options = opts - return -} - -// [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) -// serves your WordPress site from Cloudflare's edge network and caches third-party -// fonts. -func (r *ZoneSettingAutomaticPlatformOptimizationService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingAutomaticPlatformOptimizationUpdateParams, opts ...option.RequestOption) (res *ZoneSettingAutomaticPlatformOptimizationUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/automatic_platform_optimization", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) -// serves your WordPress site from Cloudflare's edge network and caches third-party -// fonts. -func (r *ZoneSettingAutomaticPlatformOptimizationService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingAutomaticPlatformOptimizationListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/automatic_platform_optimization", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateResponse struct { - Errors []ZoneSettingAutomaticPlatformOptimizationUpdateResponseError `json:"errors"` - Messages []ZoneSettingAutomaticPlatformOptimizationUpdateResponseMessage `json:"messages"` - Result ZoneSettingAutomaticPlatformOptimizationUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAutomaticPlatformOptimizationUpdateResponseJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationUpdateResponseJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticPlatformOptimizationUpdateResponse] -type zoneSettingAutomaticPlatformOptimizationUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticPlatformOptimizationUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationUpdateResponseErrorJSON contains the -// JSON metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationUpdateResponseError] -type zoneSettingAutomaticPlatformOptimizationUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticPlatformOptimizationUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationUpdateResponseMessageJSON contains the -// JSON metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationUpdateResponseMessage] -type zoneSettingAutomaticPlatformOptimizationUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateResponseResult struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType bool `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf bool `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled bool `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames []string `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress bool `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin bool `json:"wp_plugin,required"` - JSON zoneSettingAutomaticPlatformOptimizationUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationUpdateResponseResultJSON contains the -// JSON metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationUpdateResponseResult] -type zoneSettingAutomaticPlatformOptimizationUpdateResponseResultJSON struct { - CacheByDeviceType apijson.Field - Cf apijson.Field - Enabled apijson.Field - Hostnames apijson.Field - Wordpress apijson.Field - WpPlugin apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationListResponse struct { - Errors []ZoneSettingAutomaticPlatformOptimizationListResponseError `json:"errors"` - Messages []ZoneSettingAutomaticPlatformOptimizationListResponseMessage `json:"messages"` - Result ZoneSettingAutomaticPlatformOptimizationListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingAutomaticPlatformOptimizationListResponseJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationListResponseJSON contains the JSON -// metadata for the struct [ZoneSettingAutomaticPlatformOptimizationListResponse] -type zoneSettingAutomaticPlatformOptimizationListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticPlatformOptimizationListResponseErrorJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationListResponseErrorJSON contains the JSON -// metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationListResponseError] -type zoneSettingAutomaticPlatformOptimizationListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingAutomaticPlatformOptimizationListResponseMessageJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationListResponseMessageJSON contains the -// JSON metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationListResponseMessage] -type zoneSettingAutomaticPlatformOptimizationListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationListResponseResult struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType bool `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf bool `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled bool `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames []string `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress bool `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin bool `json:"wp_plugin,required"` - JSON zoneSettingAutomaticPlatformOptimizationListResponseResultJSON `json:"-"` -} - -// zoneSettingAutomaticPlatformOptimizationListResponseResultJSON contains the JSON -// metadata for the struct -// [ZoneSettingAutomaticPlatformOptimizationListResponseResult] -type zoneSettingAutomaticPlatformOptimizationListResponseResultJSON struct { - CacheByDeviceType apijson.Field - Cf apijson.Field - Enabled apijson.Field - Hostnames apijson.Field - Wordpress apijson.Field - WpPlugin apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingAutomaticPlatformOptimizationListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateParams struct { - Value param.Field[ZoneSettingAutomaticPlatformOptimizationUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingAutomaticPlatformOptimizationUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ZoneSettingAutomaticPlatformOptimizationUpdateParamsValue struct { - // Indicates whether or not - // [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - // is enabled. - CacheByDeviceType param.Field[bool] `json:"cache_by_device_type,required"` - // Indicates whether or not Cloudflare proxy is enabled. - Cf param.Field[bool] `json:"cf,required"` - // Indicates whether or not Automatic Platform Optimization is enabled. - Enabled param.Field[bool] `json:"enabled,required"` - // An array of hostnames where Automatic Platform Optimization for WordPress is - // activated. - Hostnames param.Field[[]string] `json:"hostnames,required" format:"hostname"` - // Indicates whether or not site is powered by WordPress. - Wordpress param.Field[bool] `json:"wordpress,required"` - // Indicates whether or not - // [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is - // installed. - WpPlugin param.Field[bool] `json:"wp_plugin,required"` -} - -func (r ZoneSettingAutomaticPlatformOptimizationUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} diff --git a/zonesettingautomaticplatformoptimization_test.go b/zonesettingautomaticplatformoptimization_test.go deleted file mode 100644 index 861f741962d..00000000000 --- a/zonesettingautomaticplatformoptimization_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingAutomaticPlatformOptimizationUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AutomaticPlatformOptimization.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingAutomaticPlatformOptimizationUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingAutomaticPlatformOptimizationUpdateParamsValue{ - CacheByDeviceType: cloudflare.F(false), - Cf: cloudflare.F(true), - Enabled: cloudflare.F(true), - Hostnames: cloudflare.F([]string{"www.example.com", "example.com", "shop.example.com"}), - Wordpress: cloudflare.F(true), - WpPlugin: cloudflare.F(true), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingAutomaticPlatformOptimizationList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.AutomaticPlatformOptimization.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingbrotli.go b/zonesettingbrotli.go deleted file mode 100644 index 721d1596387..00000000000 --- a/zonesettingbrotli.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingBrotliService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingBrotliService] method -// instead. -type ZoneSettingBrotliService struct { - Options []option.RequestOption -} - -// NewZoneSettingBrotliService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingBrotliService(opts ...option.RequestOption) (r *ZoneSettingBrotliService) { - r = &ZoneSettingBrotliService{} - r.Options = opts - return -} - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -func (r *ZoneSettingBrotliService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingBrotliUpdateParams, opts ...option.RequestOption) (res *ZoneSettingBrotliUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/brotli", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -func (r *ZoneSettingBrotliService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingBrotliListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/brotli", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingBrotliUpdateResponse struct { - Errors []ZoneSettingBrotliUpdateResponseError `json:"errors"` - Messages []ZoneSettingBrotliUpdateResponseMessage `json:"messages"` - // When the client requesting an asset supports the Brotli compression algorithm, - // Cloudflare will serve a Brotli compressed version of the asset. - Result ZoneSettingBrotliUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrotliUpdateResponseJSON `json:"-"` -} - -// zoneSettingBrotliUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingBrotliUpdateResponse] -type zoneSettingBrotliUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrotliUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrotliUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingBrotliUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingBrotliUpdateResponseError] -type zoneSettingBrotliUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrotliUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrotliUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingBrotliUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingBrotliUpdateResponseMessage] -type zoneSettingBrotliUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -type ZoneSettingBrotliUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrotliUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrotliUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingBrotliUpdateResponseResultValue `json:"value"` - JSON zoneSettingBrotliUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingBrotliUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingBrotliUpdateResponseResult] -type zoneSettingBrotliUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrotliUpdateResponseResultID string - -const ( - ZoneSettingBrotliUpdateResponseResultIDBrotli ZoneSettingBrotliUpdateResponseResultID = "brotli" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrotliUpdateResponseResultEditable bool - -const ( - ZoneSettingBrotliUpdateResponseResultEditableTrue ZoneSettingBrotliUpdateResponseResultEditable = true - ZoneSettingBrotliUpdateResponseResultEditableFalse ZoneSettingBrotliUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingBrotliUpdateResponseResultValue string - -const ( - ZoneSettingBrotliUpdateResponseResultValueOff ZoneSettingBrotliUpdateResponseResultValue = "off" - ZoneSettingBrotliUpdateResponseResultValueOn ZoneSettingBrotliUpdateResponseResultValue = "on" -) - -type ZoneSettingBrotliListResponse struct { - Errors []ZoneSettingBrotliListResponseError `json:"errors"` - Messages []ZoneSettingBrotliListResponseMessage `json:"messages"` - // When the client requesting an asset supports the Brotli compression algorithm, - // Cloudflare will serve a Brotli compressed version of the asset. - Result ZoneSettingBrotliListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrotliListResponseJSON `json:"-"` -} - -// zoneSettingBrotliListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingBrotliListResponse] -type zoneSettingBrotliListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrotliListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrotliListResponseErrorJSON `json:"-"` -} - -// zoneSettingBrotliListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingBrotliListResponseError] -type zoneSettingBrotliListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrotliListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrotliListResponseMessageJSON `json:"-"` -} - -// zoneSettingBrotliListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingBrotliListResponseMessage] -type zoneSettingBrotliListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When the client requesting an asset supports the Brotli compression algorithm, -// Cloudflare will serve a Brotli compressed version of the asset. -type ZoneSettingBrotliListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrotliListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrotliListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingBrotliListResponseResultValue `json:"value"` - JSON zoneSettingBrotliListResponseResultJSON `json:"-"` -} - -// zoneSettingBrotliListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingBrotliListResponseResult] -type zoneSettingBrotliListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrotliListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrotliListResponseResultID string - -const ( - ZoneSettingBrotliListResponseResultIDBrotli ZoneSettingBrotliListResponseResultID = "brotli" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrotliListResponseResultEditable bool - -const ( - ZoneSettingBrotliListResponseResultEditableTrue ZoneSettingBrotliListResponseResultEditable = true - ZoneSettingBrotliListResponseResultEditableFalse ZoneSettingBrotliListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingBrotliListResponseResultValue string - -const ( - ZoneSettingBrotliListResponseResultValueOff ZoneSettingBrotliListResponseResultValue = "off" - ZoneSettingBrotliListResponseResultValueOn ZoneSettingBrotliListResponseResultValue = "on" -) - -type ZoneSettingBrotliUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingBrotliUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingBrotliUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingBrotliUpdateParamsValue string - -const ( - ZoneSettingBrotliUpdateParamsValueOff ZoneSettingBrotliUpdateParamsValue = "off" - ZoneSettingBrotliUpdateParamsValueOn ZoneSettingBrotliUpdateParamsValue = "on" -) diff --git a/zonesettingbrotli_test.go b/zonesettingbrotli_test.go deleted file mode 100644 index cc76c7df567..00000000000 --- a/zonesettingbrotli_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingBrotliUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Brotli.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingBrotliUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingBrotliUpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingBrotliList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Brotli.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingbrowsercachettl.go b/zonesettingbrowsercachettl.go deleted file mode 100644 index 926131e3263..00000000000 --- a/zonesettingbrowsercachettl.go +++ /dev/null @@ -1,400 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingBrowserCacheTTLService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingBrowserCacheTTLService] method instead. -type ZoneSettingBrowserCacheTTLService struct { - Options []option.RequestOption -} - -// NewZoneSettingBrowserCacheTTLService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingBrowserCacheTTLService(opts ...option.RequestOption) (r *ZoneSettingBrowserCacheTTLService) { - r = &ZoneSettingBrowserCacheTTLService{} - r.Options = opts - return -} - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -func (r *ZoneSettingBrowserCacheTTLService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingBrowserCacheTTLUpdateParams, opts ...option.RequestOption) (res *ZoneSettingBrowserCacheTTLUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/browser_cache_ttl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -func (r *ZoneSettingBrowserCacheTTLService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingBrowserCacheTTLListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/browser_cache_ttl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingBrowserCacheTTLUpdateResponse struct { - Errors []ZoneSettingBrowserCacheTTLUpdateResponseError `json:"errors"` - Messages []ZoneSettingBrowserCacheTTLUpdateResponseMessage `json:"messages"` - // Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - // will remain on your visitors' computers. Cloudflare will honor any larger times - // specified by your server. - // (https://support.cloudflare.com/hc/en-us/articles/200168276). - Result ZoneSettingBrowserCacheTTLUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrowserCacheTTLUpdateResponseJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCacheTTLUpdateResponse] -type zoneSettingBrowserCacheTTLUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCacheTTLUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCacheTTLUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCacheTTLUpdateResponseError] -type zoneSettingBrowserCacheTTLUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCacheTTLUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCacheTTLUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingBrowserCacheTTLUpdateResponseMessage] -type zoneSettingBrowserCacheTTLUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -type ZoneSettingBrowserCacheTTLUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrowserCacheTTLUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrowserCacheTTLUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value ZoneSettingBrowserCacheTTLUpdateResponseResultValue `json:"value"` - JSON zoneSettingBrowserCacheTTLUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingBrowserCacheTTLUpdateResponseResult] -type zoneSettingBrowserCacheTTLUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrowserCacheTTLUpdateResponseResultID string - -const ( - ZoneSettingBrowserCacheTTLUpdateResponseResultIDBrowserCacheTTL ZoneSettingBrowserCacheTTLUpdateResponseResultID = "browser_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrowserCacheTTLUpdateResponseResultEditable bool - -const ( - ZoneSettingBrowserCacheTTLUpdateResponseResultEditableTrue ZoneSettingBrowserCacheTTLUpdateResponseResultEditable = true - ZoneSettingBrowserCacheTTLUpdateResponseResultEditableFalse ZoneSettingBrowserCacheTTLUpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingBrowserCacheTTLUpdateResponseResultValue float64 - -const ( - ZoneSettingBrowserCacheTTLUpdateResponseResultValue0 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 0 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue30 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 30 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue60 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 60 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue120 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 120 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue300 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 300 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue1200 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 1200 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue1800 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 1800 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue3600 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 3600 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue7200 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 7200 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue10800 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 10800 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue14400 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 14400 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue18000 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 18000 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue28800 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 28800 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue43200 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 43200 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue57600 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 57600 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue72000 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 72000 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue86400 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 86400 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue172800 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 172800 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue259200 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 259200 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue345600 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 345600 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue432000 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 432000 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue691200 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 691200 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue1382400 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 1382400 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue2073600 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 2073600 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue2678400 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 2678400 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue5356800 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 5356800 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue16070400 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 16070400 - ZoneSettingBrowserCacheTTLUpdateResponseResultValue31536000 ZoneSettingBrowserCacheTTLUpdateResponseResultValue = 31536000 -) - -type ZoneSettingBrowserCacheTTLListResponse struct { - Errors []ZoneSettingBrowserCacheTTLListResponseError `json:"errors"` - Messages []ZoneSettingBrowserCacheTTLListResponseMessage `json:"messages"` - // Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources - // will remain on your visitors' computers. Cloudflare will honor any larger times - // specified by your server. - // (https://support.cloudflare.com/hc/en-us/articles/200168276). - Result ZoneSettingBrowserCacheTTLListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrowserCacheTTLListResponseJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCacheTTLListResponse] -type zoneSettingBrowserCacheTTLListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCacheTTLListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCacheTTLListResponseErrorJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCacheTTLListResponseError] -type zoneSettingBrowserCacheTTLListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCacheTTLListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCacheTTLListResponseMessageJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCacheTTLListResponseMessage] -type zoneSettingBrowserCacheTTLListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources -// will remain on your visitors' computers. Cloudflare will honor any larger times -// specified by your server. -// (https://support.cloudflare.com/hc/en-us/articles/200168276). -type ZoneSettingBrowserCacheTTLListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrowserCacheTTLListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrowserCacheTTLListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value ZoneSettingBrowserCacheTTLListResponseResultValue `json:"value"` - JSON zoneSettingBrowserCacheTTLListResponseResultJSON `json:"-"` -} - -// zoneSettingBrowserCacheTTLListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCacheTTLListResponseResult] -type zoneSettingBrowserCacheTTLListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCacheTTLListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrowserCacheTTLListResponseResultID string - -const ( - ZoneSettingBrowserCacheTTLListResponseResultIDBrowserCacheTTL ZoneSettingBrowserCacheTTLListResponseResultID = "browser_cache_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrowserCacheTTLListResponseResultEditable bool - -const ( - ZoneSettingBrowserCacheTTLListResponseResultEditableTrue ZoneSettingBrowserCacheTTLListResponseResultEditable = true - ZoneSettingBrowserCacheTTLListResponseResultEditableFalse ZoneSettingBrowserCacheTTLListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingBrowserCacheTTLListResponseResultValue float64 - -const ( - ZoneSettingBrowserCacheTTLListResponseResultValue0 ZoneSettingBrowserCacheTTLListResponseResultValue = 0 - ZoneSettingBrowserCacheTTLListResponseResultValue30 ZoneSettingBrowserCacheTTLListResponseResultValue = 30 - ZoneSettingBrowserCacheTTLListResponseResultValue60 ZoneSettingBrowserCacheTTLListResponseResultValue = 60 - ZoneSettingBrowserCacheTTLListResponseResultValue120 ZoneSettingBrowserCacheTTLListResponseResultValue = 120 - ZoneSettingBrowserCacheTTLListResponseResultValue300 ZoneSettingBrowserCacheTTLListResponseResultValue = 300 - ZoneSettingBrowserCacheTTLListResponseResultValue1200 ZoneSettingBrowserCacheTTLListResponseResultValue = 1200 - ZoneSettingBrowserCacheTTLListResponseResultValue1800 ZoneSettingBrowserCacheTTLListResponseResultValue = 1800 - ZoneSettingBrowserCacheTTLListResponseResultValue3600 ZoneSettingBrowserCacheTTLListResponseResultValue = 3600 - ZoneSettingBrowserCacheTTLListResponseResultValue7200 ZoneSettingBrowserCacheTTLListResponseResultValue = 7200 - ZoneSettingBrowserCacheTTLListResponseResultValue10800 ZoneSettingBrowserCacheTTLListResponseResultValue = 10800 - ZoneSettingBrowserCacheTTLListResponseResultValue14400 ZoneSettingBrowserCacheTTLListResponseResultValue = 14400 - ZoneSettingBrowserCacheTTLListResponseResultValue18000 ZoneSettingBrowserCacheTTLListResponseResultValue = 18000 - ZoneSettingBrowserCacheTTLListResponseResultValue28800 ZoneSettingBrowserCacheTTLListResponseResultValue = 28800 - ZoneSettingBrowserCacheTTLListResponseResultValue43200 ZoneSettingBrowserCacheTTLListResponseResultValue = 43200 - ZoneSettingBrowserCacheTTLListResponseResultValue57600 ZoneSettingBrowserCacheTTLListResponseResultValue = 57600 - ZoneSettingBrowserCacheTTLListResponseResultValue72000 ZoneSettingBrowserCacheTTLListResponseResultValue = 72000 - ZoneSettingBrowserCacheTTLListResponseResultValue86400 ZoneSettingBrowserCacheTTLListResponseResultValue = 86400 - ZoneSettingBrowserCacheTTLListResponseResultValue172800 ZoneSettingBrowserCacheTTLListResponseResultValue = 172800 - ZoneSettingBrowserCacheTTLListResponseResultValue259200 ZoneSettingBrowserCacheTTLListResponseResultValue = 259200 - ZoneSettingBrowserCacheTTLListResponseResultValue345600 ZoneSettingBrowserCacheTTLListResponseResultValue = 345600 - ZoneSettingBrowserCacheTTLListResponseResultValue432000 ZoneSettingBrowserCacheTTLListResponseResultValue = 432000 - ZoneSettingBrowserCacheTTLListResponseResultValue691200 ZoneSettingBrowserCacheTTLListResponseResultValue = 691200 - ZoneSettingBrowserCacheTTLListResponseResultValue1382400 ZoneSettingBrowserCacheTTLListResponseResultValue = 1382400 - ZoneSettingBrowserCacheTTLListResponseResultValue2073600 ZoneSettingBrowserCacheTTLListResponseResultValue = 2073600 - ZoneSettingBrowserCacheTTLListResponseResultValue2678400 ZoneSettingBrowserCacheTTLListResponseResultValue = 2678400 - ZoneSettingBrowserCacheTTLListResponseResultValue5356800 ZoneSettingBrowserCacheTTLListResponseResultValue = 5356800 - ZoneSettingBrowserCacheTTLListResponseResultValue16070400 ZoneSettingBrowserCacheTTLListResponseResultValue = 16070400 - ZoneSettingBrowserCacheTTLListResponseResultValue31536000 ZoneSettingBrowserCacheTTLListResponseResultValue = 31536000 -) - -type ZoneSettingBrowserCacheTTLUpdateParams struct { - // Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting - // `Respect Existing Headers` - Value param.Field[ZoneSettingBrowserCacheTTLUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingBrowserCacheTTLUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Setting a TTL of 0 is equivalent to selecting -// `Respect Existing Headers` -type ZoneSettingBrowserCacheTTLUpdateParamsValue float64 - -const ( - ZoneSettingBrowserCacheTTLUpdateParamsValue0 ZoneSettingBrowserCacheTTLUpdateParamsValue = 0 - ZoneSettingBrowserCacheTTLUpdateParamsValue30 ZoneSettingBrowserCacheTTLUpdateParamsValue = 30 - ZoneSettingBrowserCacheTTLUpdateParamsValue60 ZoneSettingBrowserCacheTTLUpdateParamsValue = 60 - ZoneSettingBrowserCacheTTLUpdateParamsValue120 ZoneSettingBrowserCacheTTLUpdateParamsValue = 120 - ZoneSettingBrowserCacheTTLUpdateParamsValue300 ZoneSettingBrowserCacheTTLUpdateParamsValue = 300 - ZoneSettingBrowserCacheTTLUpdateParamsValue1200 ZoneSettingBrowserCacheTTLUpdateParamsValue = 1200 - ZoneSettingBrowserCacheTTLUpdateParamsValue1800 ZoneSettingBrowserCacheTTLUpdateParamsValue = 1800 - ZoneSettingBrowserCacheTTLUpdateParamsValue3600 ZoneSettingBrowserCacheTTLUpdateParamsValue = 3600 - ZoneSettingBrowserCacheTTLUpdateParamsValue7200 ZoneSettingBrowserCacheTTLUpdateParamsValue = 7200 - ZoneSettingBrowserCacheTTLUpdateParamsValue10800 ZoneSettingBrowserCacheTTLUpdateParamsValue = 10800 - ZoneSettingBrowserCacheTTLUpdateParamsValue14400 ZoneSettingBrowserCacheTTLUpdateParamsValue = 14400 - ZoneSettingBrowserCacheTTLUpdateParamsValue18000 ZoneSettingBrowserCacheTTLUpdateParamsValue = 18000 - ZoneSettingBrowserCacheTTLUpdateParamsValue28800 ZoneSettingBrowserCacheTTLUpdateParamsValue = 28800 - ZoneSettingBrowserCacheTTLUpdateParamsValue43200 ZoneSettingBrowserCacheTTLUpdateParamsValue = 43200 - ZoneSettingBrowserCacheTTLUpdateParamsValue57600 ZoneSettingBrowserCacheTTLUpdateParamsValue = 57600 - ZoneSettingBrowserCacheTTLUpdateParamsValue72000 ZoneSettingBrowserCacheTTLUpdateParamsValue = 72000 - ZoneSettingBrowserCacheTTLUpdateParamsValue86400 ZoneSettingBrowserCacheTTLUpdateParamsValue = 86400 - ZoneSettingBrowserCacheTTLUpdateParamsValue172800 ZoneSettingBrowserCacheTTLUpdateParamsValue = 172800 - ZoneSettingBrowserCacheTTLUpdateParamsValue259200 ZoneSettingBrowserCacheTTLUpdateParamsValue = 259200 - ZoneSettingBrowserCacheTTLUpdateParamsValue345600 ZoneSettingBrowserCacheTTLUpdateParamsValue = 345600 - ZoneSettingBrowserCacheTTLUpdateParamsValue432000 ZoneSettingBrowserCacheTTLUpdateParamsValue = 432000 - ZoneSettingBrowserCacheTTLUpdateParamsValue691200 ZoneSettingBrowserCacheTTLUpdateParamsValue = 691200 - ZoneSettingBrowserCacheTTLUpdateParamsValue1382400 ZoneSettingBrowserCacheTTLUpdateParamsValue = 1382400 - ZoneSettingBrowserCacheTTLUpdateParamsValue2073600 ZoneSettingBrowserCacheTTLUpdateParamsValue = 2073600 - ZoneSettingBrowserCacheTTLUpdateParamsValue2678400 ZoneSettingBrowserCacheTTLUpdateParamsValue = 2678400 - ZoneSettingBrowserCacheTTLUpdateParamsValue5356800 ZoneSettingBrowserCacheTTLUpdateParamsValue = 5356800 - ZoneSettingBrowserCacheTTLUpdateParamsValue16070400 ZoneSettingBrowserCacheTTLUpdateParamsValue = 16070400 - ZoneSettingBrowserCacheTTLUpdateParamsValue31536000 ZoneSettingBrowserCacheTTLUpdateParamsValue = 31536000 -) diff --git a/zonesettingbrowsercachettl_test.go b/zonesettingbrowsercachettl_test.go deleted file mode 100644 index e78520723f3..00000000000 --- a/zonesettingbrowsercachettl_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingBrowserCacheTTLUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.BrowserCacheTTLs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingBrowserCacheTTLUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingBrowserCacheTTLUpdateParamsValue0), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingBrowserCacheTTLList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.BrowserCacheTTLs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingbrowsercheck.go b/zonesettingbrowsercheck.go deleted file mode 100644 index e44ddfc531e..00000000000 --- a/zonesettingbrowsercheck.go +++ /dev/null @@ -1,322 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingBrowserCheckService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingBrowserCheckService] method instead. -type ZoneSettingBrowserCheckService struct { - Options []option.RequestOption -} - -// NewZoneSettingBrowserCheckService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingBrowserCheckService(opts ...option.RequestOption) (r *ZoneSettingBrowserCheckService) { - r = &ZoneSettingBrowserCheckService{} - r.Options = opts - return -} - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -func (r *ZoneSettingBrowserCheckService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingBrowserCheckUpdateParams, opts ...option.RequestOption) (res *ZoneSettingBrowserCheckUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/browser_check", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -func (r *ZoneSettingBrowserCheckService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingBrowserCheckListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/browser_check", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingBrowserCheckUpdateResponse struct { - Errors []ZoneSettingBrowserCheckUpdateResponseError `json:"errors"` - Messages []ZoneSettingBrowserCheckUpdateResponseMessage `json:"messages"` - // Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - // headers abused most commonly by spammers and denies access to your page. It will - // also challenge visitors that do not have a user agent or a non standard user - // agent (also commonly used by abuse bots, crawlers or visitors). - // (https://support.cloudflare.com/hc/en-us/articles/200170086). - Result ZoneSettingBrowserCheckUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrowserCheckUpdateResponseJSON `json:"-"` -} - -// zoneSettingBrowserCheckUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCheckUpdateResponse] -type zoneSettingBrowserCheckUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCheckUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCheckUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingBrowserCheckUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCheckUpdateResponseError] -type zoneSettingBrowserCheckUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCheckUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCheckUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingBrowserCheckUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCheckUpdateResponseMessage] -type zoneSettingBrowserCheckUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -type ZoneSettingBrowserCheckUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrowserCheckUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrowserCheckUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingBrowserCheckUpdateResponseResultValue `json:"value"` - JSON zoneSettingBrowserCheckUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingBrowserCheckUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCheckUpdateResponseResult] -type zoneSettingBrowserCheckUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrowserCheckUpdateResponseResultID string - -const ( - ZoneSettingBrowserCheckUpdateResponseResultIDBrowserCheck ZoneSettingBrowserCheckUpdateResponseResultID = "browser_check" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrowserCheckUpdateResponseResultEditable bool - -const ( - ZoneSettingBrowserCheckUpdateResponseResultEditableTrue ZoneSettingBrowserCheckUpdateResponseResultEditable = true - ZoneSettingBrowserCheckUpdateResponseResultEditableFalse ZoneSettingBrowserCheckUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingBrowserCheckUpdateResponseResultValue string - -const ( - ZoneSettingBrowserCheckUpdateResponseResultValueOn ZoneSettingBrowserCheckUpdateResponseResultValue = "on" - ZoneSettingBrowserCheckUpdateResponseResultValueOff ZoneSettingBrowserCheckUpdateResponseResultValue = "off" -) - -type ZoneSettingBrowserCheckListResponse struct { - Errors []ZoneSettingBrowserCheckListResponseError `json:"errors"` - Messages []ZoneSettingBrowserCheckListResponseMessage `json:"messages"` - // Browser Integrity Check is similar to Bad Behavior and looks for common HTTP - // headers abused most commonly by spammers and denies access to your page. It will - // also challenge visitors that do not have a user agent or a non standard user - // agent (also commonly used by abuse bots, crawlers or visitors). - // (https://support.cloudflare.com/hc/en-us/articles/200170086). - Result ZoneSettingBrowserCheckListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingBrowserCheckListResponseJSON `json:"-"` -} - -// zoneSettingBrowserCheckListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCheckListResponse] -type zoneSettingBrowserCheckListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCheckListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCheckListResponseErrorJSON `json:"-"` -} - -// zoneSettingBrowserCheckListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCheckListResponseError] -type zoneSettingBrowserCheckListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingBrowserCheckListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingBrowserCheckListResponseMessageJSON `json:"-"` -} - -// zoneSettingBrowserCheckListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingBrowserCheckListResponseMessage] -type zoneSettingBrowserCheckListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Browser Integrity Check is similar to Bad Behavior and looks for common HTTP -// headers abused most commonly by spammers and denies access to your page. It will -// also challenge visitors that do not have a user agent or a non standard user -// agent (also commonly used by abuse bots, crawlers or visitors). -// (https://support.cloudflare.com/hc/en-us/articles/200170086). -type ZoneSettingBrowserCheckListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingBrowserCheckListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingBrowserCheckListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingBrowserCheckListResponseResultValue `json:"value"` - JSON zoneSettingBrowserCheckListResponseResultJSON `json:"-"` -} - -// zoneSettingBrowserCheckListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingBrowserCheckListResponseResult] -type zoneSettingBrowserCheckListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingBrowserCheckListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingBrowserCheckListResponseResultID string - -const ( - ZoneSettingBrowserCheckListResponseResultIDBrowserCheck ZoneSettingBrowserCheckListResponseResultID = "browser_check" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingBrowserCheckListResponseResultEditable bool - -const ( - ZoneSettingBrowserCheckListResponseResultEditableTrue ZoneSettingBrowserCheckListResponseResultEditable = true - ZoneSettingBrowserCheckListResponseResultEditableFalse ZoneSettingBrowserCheckListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingBrowserCheckListResponseResultValue string - -const ( - ZoneSettingBrowserCheckListResponseResultValueOn ZoneSettingBrowserCheckListResponseResultValue = "on" - ZoneSettingBrowserCheckListResponseResultValueOff ZoneSettingBrowserCheckListResponseResultValue = "off" -) - -type ZoneSettingBrowserCheckUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingBrowserCheckUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingBrowserCheckUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingBrowserCheckUpdateParamsValue string - -const ( - ZoneSettingBrowserCheckUpdateParamsValueOn ZoneSettingBrowserCheckUpdateParamsValue = "on" - ZoneSettingBrowserCheckUpdateParamsValueOff ZoneSettingBrowserCheckUpdateParamsValue = "off" -) diff --git a/zonesettingbrowsercheck_test.go b/zonesettingbrowsercheck_test.go deleted file mode 100644 index 7da1922ca27..00000000000 --- a/zonesettingbrowsercheck_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingBrowserCheckUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.BrowserChecks.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingBrowserCheckUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingBrowserCheckUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingBrowserCheckList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.BrowserChecks.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingcachelevel.go b/zonesettingcachelevel.go deleted file mode 100644 index 05f6c2a7a72..00000000000 --- a/zonesettingcachelevel.go +++ /dev/null @@ -1,325 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingCacheLevelService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingCacheLevelService] -// method instead. -type ZoneSettingCacheLevelService struct { - Options []option.RequestOption -} - -// NewZoneSettingCacheLevelService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingCacheLevelService(opts ...option.RequestOption) (r *ZoneSettingCacheLevelService) { - r = &ZoneSettingCacheLevelService{} - r.Options = opts - return -} - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -func (r *ZoneSettingCacheLevelService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingCacheLevelUpdateParams, opts ...option.RequestOption) (res *ZoneSettingCacheLevelUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/cache_level", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -func (r *ZoneSettingCacheLevelService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingCacheLevelListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/cache_level", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingCacheLevelUpdateResponse struct { - Errors []ZoneSettingCacheLevelUpdateResponseError `json:"errors"` - Messages []ZoneSettingCacheLevelUpdateResponseMessage `json:"messages"` - // Cache Level functions based off the setting level. The basic setting will cache - // most static resources (i.e., css, images, and JavaScript). The simplified - // setting will ignore the query string when delivering a cached resource. The - // aggressive setting will cache all static resources, including ones with a query - // string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - Result ZoneSettingCacheLevelUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingCacheLevelUpdateResponseJSON `json:"-"` -} - -// zoneSettingCacheLevelUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelUpdateResponse] -type zoneSettingCacheLevelUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCacheLevelUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCacheLevelUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingCacheLevelUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelUpdateResponseError] -type zoneSettingCacheLevelUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCacheLevelUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCacheLevelUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingCacheLevelUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingCacheLevelUpdateResponseMessage] -type zoneSettingCacheLevelUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -type ZoneSettingCacheLevelUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingCacheLevelUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingCacheLevelUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingCacheLevelUpdateResponseResultValue `json:"value"` - JSON zoneSettingCacheLevelUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingCacheLevelUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelUpdateResponseResult] -type zoneSettingCacheLevelUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingCacheLevelUpdateResponseResultID string - -const ( - ZoneSettingCacheLevelUpdateResponseResultIDCacheLevel ZoneSettingCacheLevelUpdateResponseResultID = "cache_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingCacheLevelUpdateResponseResultEditable bool - -const ( - ZoneSettingCacheLevelUpdateResponseResultEditableTrue ZoneSettingCacheLevelUpdateResponseResultEditable = true - ZoneSettingCacheLevelUpdateResponseResultEditableFalse ZoneSettingCacheLevelUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingCacheLevelUpdateResponseResultValue string - -const ( - ZoneSettingCacheLevelUpdateResponseResultValueAggressive ZoneSettingCacheLevelUpdateResponseResultValue = "aggressive" - ZoneSettingCacheLevelUpdateResponseResultValueBasic ZoneSettingCacheLevelUpdateResponseResultValue = "basic" - ZoneSettingCacheLevelUpdateResponseResultValueSimplified ZoneSettingCacheLevelUpdateResponseResultValue = "simplified" -) - -type ZoneSettingCacheLevelListResponse struct { - Errors []ZoneSettingCacheLevelListResponseError `json:"errors"` - Messages []ZoneSettingCacheLevelListResponseMessage `json:"messages"` - // Cache Level functions based off the setting level. The basic setting will cache - // most static resources (i.e., css, images, and JavaScript). The simplified - // setting will ignore the query string when delivering a cached resource. The - // aggressive setting will cache all static resources, including ones with a query - // string. (https://support.cloudflare.com/hc/en-us/articles/200168256). - Result ZoneSettingCacheLevelListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingCacheLevelListResponseJSON `json:"-"` -} - -// zoneSettingCacheLevelListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingCacheLevelListResponse] -type zoneSettingCacheLevelListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCacheLevelListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCacheLevelListResponseErrorJSON `json:"-"` -} - -// zoneSettingCacheLevelListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelListResponseError] -type zoneSettingCacheLevelListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCacheLevelListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCacheLevelListResponseMessageJSON `json:"-"` -} - -// zoneSettingCacheLevelListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelListResponseMessage] -type zoneSettingCacheLevelListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cache Level functions based off the setting level. The basic setting will cache -// most static resources (i.e., css, images, and JavaScript). The simplified -// setting will ignore the query string when delivering a cached resource. The -// aggressive setting will cache all static resources, including ones with a query -// string. (https://support.cloudflare.com/hc/en-us/articles/200168256). -type ZoneSettingCacheLevelListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingCacheLevelListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingCacheLevelListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingCacheLevelListResponseResultValue `json:"value"` - JSON zoneSettingCacheLevelListResponseResultJSON `json:"-"` -} - -// zoneSettingCacheLevelListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingCacheLevelListResponseResult] -type zoneSettingCacheLevelListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCacheLevelListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingCacheLevelListResponseResultID string - -const ( - ZoneSettingCacheLevelListResponseResultIDCacheLevel ZoneSettingCacheLevelListResponseResultID = "cache_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingCacheLevelListResponseResultEditable bool - -const ( - ZoneSettingCacheLevelListResponseResultEditableTrue ZoneSettingCacheLevelListResponseResultEditable = true - ZoneSettingCacheLevelListResponseResultEditableFalse ZoneSettingCacheLevelListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingCacheLevelListResponseResultValue string - -const ( - ZoneSettingCacheLevelListResponseResultValueAggressive ZoneSettingCacheLevelListResponseResultValue = "aggressive" - ZoneSettingCacheLevelListResponseResultValueBasic ZoneSettingCacheLevelListResponseResultValue = "basic" - ZoneSettingCacheLevelListResponseResultValueSimplified ZoneSettingCacheLevelListResponseResultValue = "simplified" -) - -type ZoneSettingCacheLevelUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingCacheLevelUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingCacheLevelUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingCacheLevelUpdateParamsValue string - -const ( - ZoneSettingCacheLevelUpdateParamsValueAggressive ZoneSettingCacheLevelUpdateParamsValue = "aggressive" - ZoneSettingCacheLevelUpdateParamsValueBasic ZoneSettingCacheLevelUpdateParamsValue = "basic" - ZoneSettingCacheLevelUpdateParamsValueSimplified ZoneSettingCacheLevelUpdateParamsValue = "simplified" -) diff --git a/zonesettingcachelevel_test.go b/zonesettingcachelevel_test.go deleted file mode 100644 index 013eabc5e5f..00000000000 --- a/zonesettingcachelevel_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingCacheLevelUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.CacheLevels.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingCacheLevelUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingCacheLevelUpdateParamsValueAggressive), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingCacheLevelList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.CacheLevels.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingchallengettl.go b/zonesettingchallengettl.go deleted file mode 100644 index 66f4b728538..00000000000 --- a/zonesettingchallengettl.go +++ /dev/null @@ -1,358 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingChallengeTTLService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingChallengeTTLService] method instead. -type ZoneSettingChallengeTTLService struct { - Options []option.RequestOption -} - -// NewZoneSettingChallengeTTLService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingChallengeTTLService(opts ...option.RequestOption) (r *ZoneSettingChallengeTTLService) { - r = &ZoneSettingChallengeTTLService{} - r.Options = opts - return -} - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -func (r *ZoneSettingChallengeTTLService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingChallengeTTLUpdateParams, opts ...option.RequestOption) (res *ZoneSettingChallengeTTLUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/challenge_ttl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -func (r *ZoneSettingChallengeTTLService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingChallengeTTLListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/challenge_ttl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingChallengeTTLUpdateResponse struct { - Errors []ZoneSettingChallengeTTLUpdateResponseError `json:"errors"` - Messages []ZoneSettingChallengeTTLUpdateResponseMessage `json:"messages"` - // Specify how long a visitor is allowed access to your site after successfully - // completing a challenge (such as a CAPTCHA). After the TTL has expired the - // visitor will have to complete a new challenge. We recommend a 15 - 45 minute - // setting and will attempt to honor any setting above 45 minutes. - // (https://support.cloudflare.com/hc/en-us/articles/200170136). - Result ZoneSettingChallengeTTLUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingChallengeTTLUpdateResponseJSON `json:"-"` -} - -// zoneSettingChallengeTTLUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingChallengeTTLUpdateResponse] -type zoneSettingChallengeTTLUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingChallengeTTLUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingChallengeTTLUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingChallengeTTLUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingChallengeTTLUpdateResponseError] -type zoneSettingChallengeTTLUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingChallengeTTLUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingChallengeTTLUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingChallengeTTLUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingChallengeTTLUpdateResponseMessage] -type zoneSettingChallengeTTLUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -type ZoneSettingChallengeTTLUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingChallengeTTLUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingChallengeTTLUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingChallengeTTLUpdateResponseResultValue `json:"value"` - JSON zoneSettingChallengeTTLUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingChallengeTTLUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingChallengeTTLUpdateResponseResult] -type zoneSettingChallengeTTLUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingChallengeTTLUpdateResponseResultID string - -const ( - ZoneSettingChallengeTTLUpdateResponseResultIDChallengeTTL ZoneSettingChallengeTTLUpdateResponseResultID = "challenge_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingChallengeTTLUpdateResponseResultEditable bool - -const ( - ZoneSettingChallengeTTLUpdateResponseResultEditableTrue ZoneSettingChallengeTTLUpdateResponseResultEditable = true - ZoneSettingChallengeTTLUpdateResponseResultEditableFalse ZoneSettingChallengeTTLUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingChallengeTTLUpdateResponseResultValue float64 - -const ( - ZoneSettingChallengeTTLUpdateResponseResultValue300 ZoneSettingChallengeTTLUpdateResponseResultValue = 300 - ZoneSettingChallengeTTLUpdateResponseResultValue900 ZoneSettingChallengeTTLUpdateResponseResultValue = 900 - ZoneSettingChallengeTTLUpdateResponseResultValue1800 ZoneSettingChallengeTTLUpdateResponseResultValue = 1800 - ZoneSettingChallengeTTLUpdateResponseResultValue2700 ZoneSettingChallengeTTLUpdateResponseResultValue = 2700 - ZoneSettingChallengeTTLUpdateResponseResultValue3600 ZoneSettingChallengeTTLUpdateResponseResultValue = 3600 - ZoneSettingChallengeTTLUpdateResponseResultValue7200 ZoneSettingChallengeTTLUpdateResponseResultValue = 7200 - ZoneSettingChallengeTTLUpdateResponseResultValue10800 ZoneSettingChallengeTTLUpdateResponseResultValue = 10800 - ZoneSettingChallengeTTLUpdateResponseResultValue14400 ZoneSettingChallengeTTLUpdateResponseResultValue = 14400 - ZoneSettingChallengeTTLUpdateResponseResultValue28800 ZoneSettingChallengeTTLUpdateResponseResultValue = 28800 - ZoneSettingChallengeTTLUpdateResponseResultValue57600 ZoneSettingChallengeTTLUpdateResponseResultValue = 57600 - ZoneSettingChallengeTTLUpdateResponseResultValue86400 ZoneSettingChallengeTTLUpdateResponseResultValue = 86400 - ZoneSettingChallengeTTLUpdateResponseResultValue604800 ZoneSettingChallengeTTLUpdateResponseResultValue = 604800 - ZoneSettingChallengeTTLUpdateResponseResultValue2592000 ZoneSettingChallengeTTLUpdateResponseResultValue = 2592000 - ZoneSettingChallengeTTLUpdateResponseResultValue31536000 ZoneSettingChallengeTTLUpdateResponseResultValue = 31536000 -) - -type ZoneSettingChallengeTTLListResponse struct { - Errors []ZoneSettingChallengeTTLListResponseError `json:"errors"` - Messages []ZoneSettingChallengeTTLListResponseMessage `json:"messages"` - // Specify how long a visitor is allowed access to your site after successfully - // completing a challenge (such as a CAPTCHA). After the TTL has expired the - // visitor will have to complete a new challenge. We recommend a 15 - 45 minute - // setting and will attempt to honor any setting above 45 minutes. - // (https://support.cloudflare.com/hc/en-us/articles/200170136). - Result ZoneSettingChallengeTTLListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingChallengeTTLListResponseJSON `json:"-"` -} - -// zoneSettingChallengeTTLListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingChallengeTTLListResponse] -type zoneSettingChallengeTTLListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingChallengeTTLListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingChallengeTTLListResponseErrorJSON `json:"-"` -} - -// zoneSettingChallengeTTLListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingChallengeTTLListResponseError] -type zoneSettingChallengeTTLListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingChallengeTTLListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingChallengeTTLListResponseMessageJSON `json:"-"` -} - -// zoneSettingChallengeTTLListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingChallengeTTLListResponseMessage] -type zoneSettingChallengeTTLListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Specify how long a visitor is allowed access to your site after successfully -// completing a challenge (such as a CAPTCHA). After the TTL has expired the -// visitor will have to complete a new challenge. We recommend a 15 - 45 minute -// setting and will attempt to honor any setting above 45 minutes. -// (https://support.cloudflare.com/hc/en-us/articles/200170136). -type ZoneSettingChallengeTTLListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingChallengeTTLListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingChallengeTTLListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingChallengeTTLListResponseResultValue `json:"value"` - JSON zoneSettingChallengeTTLListResponseResultJSON `json:"-"` -} - -// zoneSettingChallengeTTLListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingChallengeTTLListResponseResult] -type zoneSettingChallengeTTLListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingChallengeTTLListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingChallengeTTLListResponseResultID string - -const ( - ZoneSettingChallengeTTLListResponseResultIDChallengeTTL ZoneSettingChallengeTTLListResponseResultID = "challenge_ttl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingChallengeTTLListResponseResultEditable bool - -const ( - ZoneSettingChallengeTTLListResponseResultEditableTrue ZoneSettingChallengeTTLListResponseResultEditable = true - ZoneSettingChallengeTTLListResponseResultEditableFalse ZoneSettingChallengeTTLListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingChallengeTTLListResponseResultValue float64 - -const ( - ZoneSettingChallengeTTLListResponseResultValue300 ZoneSettingChallengeTTLListResponseResultValue = 300 - ZoneSettingChallengeTTLListResponseResultValue900 ZoneSettingChallengeTTLListResponseResultValue = 900 - ZoneSettingChallengeTTLListResponseResultValue1800 ZoneSettingChallengeTTLListResponseResultValue = 1800 - ZoneSettingChallengeTTLListResponseResultValue2700 ZoneSettingChallengeTTLListResponseResultValue = 2700 - ZoneSettingChallengeTTLListResponseResultValue3600 ZoneSettingChallengeTTLListResponseResultValue = 3600 - ZoneSettingChallengeTTLListResponseResultValue7200 ZoneSettingChallengeTTLListResponseResultValue = 7200 - ZoneSettingChallengeTTLListResponseResultValue10800 ZoneSettingChallengeTTLListResponseResultValue = 10800 - ZoneSettingChallengeTTLListResponseResultValue14400 ZoneSettingChallengeTTLListResponseResultValue = 14400 - ZoneSettingChallengeTTLListResponseResultValue28800 ZoneSettingChallengeTTLListResponseResultValue = 28800 - ZoneSettingChallengeTTLListResponseResultValue57600 ZoneSettingChallengeTTLListResponseResultValue = 57600 - ZoneSettingChallengeTTLListResponseResultValue86400 ZoneSettingChallengeTTLListResponseResultValue = 86400 - ZoneSettingChallengeTTLListResponseResultValue604800 ZoneSettingChallengeTTLListResponseResultValue = 604800 - ZoneSettingChallengeTTLListResponseResultValue2592000 ZoneSettingChallengeTTLListResponseResultValue = 2592000 - ZoneSettingChallengeTTLListResponseResultValue31536000 ZoneSettingChallengeTTLListResponseResultValue = 31536000 -) - -type ZoneSettingChallengeTTLUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingChallengeTTLUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingChallengeTTLUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingChallengeTTLUpdateParamsValue float64 - -const ( - ZoneSettingChallengeTTLUpdateParamsValue300 ZoneSettingChallengeTTLUpdateParamsValue = 300 - ZoneSettingChallengeTTLUpdateParamsValue900 ZoneSettingChallengeTTLUpdateParamsValue = 900 - ZoneSettingChallengeTTLUpdateParamsValue1800 ZoneSettingChallengeTTLUpdateParamsValue = 1800 - ZoneSettingChallengeTTLUpdateParamsValue2700 ZoneSettingChallengeTTLUpdateParamsValue = 2700 - ZoneSettingChallengeTTLUpdateParamsValue3600 ZoneSettingChallengeTTLUpdateParamsValue = 3600 - ZoneSettingChallengeTTLUpdateParamsValue7200 ZoneSettingChallengeTTLUpdateParamsValue = 7200 - ZoneSettingChallengeTTLUpdateParamsValue10800 ZoneSettingChallengeTTLUpdateParamsValue = 10800 - ZoneSettingChallengeTTLUpdateParamsValue14400 ZoneSettingChallengeTTLUpdateParamsValue = 14400 - ZoneSettingChallengeTTLUpdateParamsValue28800 ZoneSettingChallengeTTLUpdateParamsValue = 28800 - ZoneSettingChallengeTTLUpdateParamsValue57600 ZoneSettingChallengeTTLUpdateParamsValue = 57600 - ZoneSettingChallengeTTLUpdateParamsValue86400 ZoneSettingChallengeTTLUpdateParamsValue = 86400 - ZoneSettingChallengeTTLUpdateParamsValue604800 ZoneSettingChallengeTTLUpdateParamsValue = 604800 - ZoneSettingChallengeTTLUpdateParamsValue2592000 ZoneSettingChallengeTTLUpdateParamsValue = 2592000 - ZoneSettingChallengeTTLUpdateParamsValue31536000 ZoneSettingChallengeTTLUpdateParamsValue = 31536000 -) diff --git a/zonesettingchallengettl_test.go b/zonesettingchallengettl_test.go deleted file mode 100644 index b698993a3c9..00000000000 --- a/zonesettingchallengettl_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingChallengeTTLUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ChallengeTTLs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingChallengeTTLUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingChallengeTTLUpdateParamsValue300), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingChallengeTTLList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ChallengeTTLs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingcipher.go b/zonesettingcipher.go deleted file mode 100644 index 4a7cda7ba0a..00000000000 --- a/zonesettingcipher.go +++ /dev/null @@ -1,278 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingCipherService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingCipherService] method -// instead. -type ZoneSettingCipherService struct { - Options []option.RequestOption -} - -// NewZoneSettingCipherService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingCipherService(opts ...option.RequestOption) (r *ZoneSettingCipherService) { - r = &ZoneSettingCipherService{} - r.Options = opts - return -} - -// Changes ciphers setting. -func (r *ZoneSettingCipherService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingCipherUpdateParams, opts ...option.RequestOption) (res *ZoneSettingCipherUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ciphers", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets ciphers setting. -func (r *ZoneSettingCipherService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingCipherListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ciphers", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingCipherUpdateResponse struct { - Errors []ZoneSettingCipherUpdateResponseError `json:"errors"` - Messages []ZoneSettingCipherUpdateResponseMessage `json:"messages"` - // An allowlist of ciphers for TLS termination. These ciphers must be in the - // BoringSSL format. - Result ZoneSettingCipherUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingCipherUpdateResponseJSON `json:"-"` -} - -// zoneSettingCipherUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingCipherUpdateResponse] -type zoneSettingCipherUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCipherUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCipherUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingCipherUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingCipherUpdateResponseError] -type zoneSettingCipherUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCipherUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCipherUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingCipherUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingCipherUpdateResponseMessage] -type zoneSettingCipherUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// An allowlist of ciphers for TLS termination. These ciphers must be in the -// BoringSSL format. -type ZoneSettingCipherUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingCipherUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingCipherUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value []string `json:"value"` - JSON zoneSettingCipherUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingCipherUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingCipherUpdateResponseResult] -type zoneSettingCipherUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingCipherUpdateResponseResultID string - -const ( - ZoneSettingCipherUpdateResponseResultIDCiphers ZoneSettingCipherUpdateResponseResultID = "ciphers" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingCipherUpdateResponseResultEditable bool - -const ( - ZoneSettingCipherUpdateResponseResultEditableTrue ZoneSettingCipherUpdateResponseResultEditable = true - ZoneSettingCipherUpdateResponseResultEditableFalse ZoneSettingCipherUpdateResponseResultEditable = false -) - -type ZoneSettingCipherListResponse struct { - Errors []ZoneSettingCipherListResponseError `json:"errors"` - Messages []ZoneSettingCipherListResponseMessage `json:"messages"` - // An allowlist of ciphers for TLS termination. These ciphers must be in the - // BoringSSL format. - Result ZoneSettingCipherListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingCipherListResponseJSON `json:"-"` -} - -// zoneSettingCipherListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingCipherListResponse] -type zoneSettingCipherListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCipherListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCipherListResponseErrorJSON `json:"-"` -} - -// zoneSettingCipherListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingCipherListResponseError] -type zoneSettingCipherListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingCipherListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingCipherListResponseMessageJSON `json:"-"` -} - -// zoneSettingCipherListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingCipherListResponseMessage] -type zoneSettingCipherListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// An allowlist of ciphers for TLS termination. These ciphers must be in the -// BoringSSL format. -type ZoneSettingCipherListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingCipherListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingCipherListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value []string `json:"value"` - JSON zoneSettingCipherListResponseResultJSON `json:"-"` -} - -// zoneSettingCipherListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingCipherListResponseResult] -type zoneSettingCipherListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingCipherListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingCipherListResponseResultID string - -const ( - ZoneSettingCipherListResponseResultIDCiphers ZoneSettingCipherListResponseResultID = "ciphers" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingCipherListResponseResultEditable bool - -const ( - ZoneSettingCipherListResponseResultEditableTrue ZoneSettingCipherListResponseResultEditable = true - ZoneSettingCipherListResponseResultEditableFalse ZoneSettingCipherListResponseResultEditable = false -) - -type ZoneSettingCipherUpdateParams struct { - // Value of the zone setting. - Value param.Field[[]string] `json:"value,required"` -} - -func (r ZoneSettingCipherUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} diff --git a/zonesettingcipher_test.go b/zonesettingcipher_test.go deleted file mode 100644 index 43fff0692c8..00000000000 --- a/zonesettingcipher_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingCipherUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Ciphers.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingCipherUpdateParams{ - Value: cloudflare.F([]string{"ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"}), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingCipherList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Ciphers.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingdevelopmentmode.go b/zonesettingdevelopmentmode.go deleted file mode 100644 index a7a1af5ec3d..00000000000 --- a/zonesettingdevelopmentmode.go +++ /dev/null @@ -1,338 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingDevelopmentModeService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingDevelopmentModeService] method instead. -type ZoneSettingDevelopmentModeService struct { - Options []option.RequestOption -} - -// NewZoneSettingDevelopmentModeService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingDevelopmentModeService(opts ...option.RequestOption) (r *ZoneSettingDevelopmentModeService) { - r = &ZoneSettingDevelopmentModeService{} - r.Options = opts - return -} - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -func (r *ZoneSettingDevelopmentModeService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingDevelopmentModeUpdateParams, opts ...option.RequestOption) (res *ZoneSettingDevelopmentModeUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/development_mode", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -func (r *ZoneSettingDevelopmentModeService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingDevelopmentModeListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/development_mode", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingDevelopmentModeUpdateResponse struct { - Errors []ZoneSettingDevelopmentModeUpdateResponseError `json:"errors"` - Messages []ZoneSettingDevelopmentModeUpdateResponseMessage `json:"messages"` - // Development Mode temporarily allows you to enter development mode for your - // websites if you need to make changes to your site. This will bypass Cloudflare's - // accelerated cache and slow down your site, but is useful if you are making - // changes to cacheable content (like images, css, or JavaScript) and would like to - // see those changes right away. Once entered, development mode will last for 3 - // hours and then automatically toggle off. - Result ZoneSettingDevelopmentModeUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingDevelopmentModeUpdateResponseJSON `json:"-"` -} - -// zoneSettingDevelopmentModeUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingDevelopmentModeUpdateResponse] -type zoneSettingDevelopmentModeUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingDevelopmentModeUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingDevelopmentModeUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingDevelopmentModeUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingDevelopmentModeUpdateResponseError] -type zoneSettingDevelopmentModeUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingDevelopmentModeUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingDevelopmentModeUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingDevelopmentModeUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingDevelopmentModeUpdateResponseMessage] -type zoneSettingDevelopmentModeUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -type ZoneSettingDevelopmentModeUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingDevelopmentModeUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingDevelopmentModeUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The interval (in seconds) from when - // development mode expires (positive integer) or last expired (negative integer) - // for the domain. If development mode has never been enabled, this value is false. - TimeRemaining float64 `json:"time_remaining"` - // Value of the zone setting. - Value ZoneSettingDevelopmentModeUpdateResponseResultValue `json:"value"` - JSON zoneSettingDevelopmentModeUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingDevelopmentModeUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingDevelopmentModeUpdateResponseResult] -type zoneSettingDevelopmentModeUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - TimeRemaining apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingDevelopmentModeUpdateResponseResultID string - -const ( - ZoneSettingDevelopmentModeUpdateResponseResultIDDevelopmentMode ZoneSettingDevelopmentModeUpdateResponseResultID = "development_mode" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingDevelopmentModeUpdateResponseResultEditable bool - -const ( - ZoneSettingDevelopmentModeUpdateResponseResultEditableTrue ZoneSettingDevelopmentModeUpdateResponseResultEditable = true - ZoneSettingDevelopmentModeUpdateResponseResultEditableFalse ZoneSettingDevelopmentModeUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingDevelopmentModeUpdateResponseResultValue string - -const ( - ZoneSettingDevelopmentModeUpdateResponseResultValueOn ZoneSettingDevelopmentModeUpdateResponseResultValue = "on" - ZoneSettingDevelopmentModeUpdateResponseResultValueOff ZoneSettingDevelopmentModeUpdateResponseResultValue = "off" -) - -type ZoneSettingDevelopmentModeListResponse struct { - Errors []ZoneSettingDevelopmentModeListResponseError `json:"errors"` - Messages []ZoneSettingDevelopmentModeListResponseMessage `json:"messages"` - // Development Mode temporarily allows you to enter development mode for your - // websites if you need to make changes to your site. This will bypass Cloudflare's - // accelerated cache and slow down your site, but is useful if you are making - // changes to cacheable content (like images, css, or JavaScript) and would like to - // see those changes right away. Once entered, development mode will last for 3 - // hours and then automatically toggle off. - Result ZoneSettingDevelopmentModeListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingDevelopmentModeListResponseJSON `json:"-"` -} - -// zoneSettingDevelopmentModeListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingDevelopmentModeListResponse] -type zoneSettingDevelopmentModeListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingDevelopmentModeListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingDevelopmentModeListResponseErrorJSON `json:"-"` -} - -// zoneSettingDevelopmentModeListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingDevelopmentModeListResponseError] -type zoneSettingDevelopmentModeListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingDevelopmentModeListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingDevelopmentModeListResponseMessageJSON `json:"-"` -} - -// zoneSettingDevelopmentModeListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingDevelopmentModeListResponseMessage] -type zoneSettingDevelopmentModeListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Development Mode temporarily allows you to enter development mode for your -// websites if you need to make changes to your site. This will bypass Cloudflare's -// accelerated cache and slow down your site, but is useful if you are making -// changes to cacheable content (like images, css, or JavaScript) and would like to -// see those changes right away. Once entered, development mode will last for 3 -// hours and then automatically toggle off. -type ZoneSettingDevelopmentModeListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingDevelopmentModeListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingDevelopmentModeListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: The interval (in seconds) from when - // development mode expires (positive integer) or last expired (negative integer) - // for the domain. If development mode has never been enabled, this value is false. - TimeRemaining float64 `json:"time_remaining"` - // Value of the zone setting. - Value ZoneSettingDevelopmentModeListResponseResultValue `json:"value"` - JSON zoneSettingDevelopmentModeListResponseResultJSON `json:"-"` -} - -// zoneSettingDevelopmentModeListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingDevelopmentModeListResponseResult] -type zoneSettingDevelopmentModeListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - TimeRemaining apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingDevelopmentModeListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingDevelopmentModeListResponseResultID string - -const ( - ZoneSettingDevelopmentModeListResponseResultIDDevelopmentMode ZoneSettingDevelopmentModeListResponseResultID = "development_mode" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingDevelopmentModeListResponseResultEditable bool - -const ( - ZoneSettingDevelopmentModeListResponseResultEditableTrue ZoneSettingDevelopmentModeListResponseResultEditable = true - ZoneSettingDevelopmentModeListResponseResultEditableFalse ZoneSettingDevelopmentModeListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingDevelopmentModeListResponseResultValue string - -const ( - ZoneSettingDevelopmentModeListResponseResultValueOn ZoneSettingDevelopmentModeListResponseResultValue = "on" - ZoneSettingDevelopmentModeListResponseResultValueOff ZoneSettingDevelopmentModeListResponseResultValue = "off" -) - -type ZoneSettingDevelopmentModeUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingDevelopmentModeUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingDevelopmentModeUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingDevelopmentModeUpdateParamsValue string - -const ( - ZoneSettingDevelopmentModeUpdateParamsValueOn ZoneSettingDevelopmentModeUpdateParamsValue = "on" - ZoneSettingDevelopmentModeUpdateParamsValueOff ZoneSettingDevelopmentModeUpdateParamsValue = "off" -) diff --git a/zonesettingdevelopmentmode_test.go b/zonesettingdevelopmentmode_test.go deleted file mode 100644 index ca34fd753e6..00000000000 --- a/zonesettingdevelopmentmode_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingDevelopmentModeUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.DevelopmentModes.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingDevelopmentModeUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingDevelopmentModeUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingDevelopmentModeList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.DevelopmentModes.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingearlyhint.go b/zonesettingearlyhint.go deleted file mode 100644 index 193787ce88a..00000000000 --- a/zonesettingearlyhint.go +++ /dev/null @@ -1,316 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingEarlyHintService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingEarlyHintService] -// method instead. -type ZoneSettingEarlyHintService struct { - Options []option.RequestOption -} - -// NewZoneSettingEarlyHintService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingEarlyHintService(opts ...option.RequestOption) (r *ZoneSettingEarlyHintService) { - r = &ZoneSettingEarlyHintService{} - r.Options = opts - return -} - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -func (r *ZoneSettingEarlyHintService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingEarlyHintUpdateParams, opts ...option.RequestOption) (res *ZoneSettingEarlyHintUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/early_hints", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -func (r *ZoneSettingEarlyHintService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingEarlyHintListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/early_hints", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingEarlyHintUpdateResponse struct { - Errors []ZoneSettingEarlyHintUpdateResponseError `json:"errors"` - Messages []ZoneSettingEarlyHintUpdateResponseMessage `json:"messages"` - // When enabled, Cloudflare will attempt to speed up overall page loads by serving - // `103` responses with `Link` headers from the final response. Refer to - // [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - // more information. - Result ZoneSettingEarlyHintUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingEarlyHintUpdateResponseJSON `json:"-"` -} - -// zoneSettingEarlyHintUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingEarlyHintUpdateResponse] -type zoneSettingEarlyHintUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEarlyHintUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEarlyHintUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingEarlyHintUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintUpdateResponseError] -type zoneSettingEarlyHintUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEarlyHintUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEarlyHintUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingEarlyHintUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintUpdateResponseMessage] -type zoneSettingEarlyHintUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -type ZoneSettingEarlyHintUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingEarlyHintUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEarlyHintUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEarlyHintUpdateResponseResultValue `json:"value"` - JSON zoneSettingEarlyHintUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingEarlyHintUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintUpdateResponseResult] -type zoneSettingEarlyHintUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingEarlyHintUpdateResponseResultID string - -const ( - ZoneSettingEarlyHintUpdateResponseResultIDEarlyHints ZoneSettingEarlyHintUpdateResponseResultID = "early_hints" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEarlyHintUpdateResponseResultEditable bool - -const ( - ZoneSettingEarlyHintUpdateResponseResultEditableTrue ZoneSettingEarlyHintUpdateResponseResultEditable = true - ZoneSettingEarlyHintUpdateResponseResultEditableFalse ZoneSettingEarlyHintUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingEarlyHintUpdateResponseResultValue string - -const ( - ZoneSettingEarlyHintUpdateResponseResultValueOn ZoneSettingEarlyHintUpdateResponseResultValue = "on" - ZoneSettingEarlyHintUpdateResponseResultValueOff ZoneSettingEarlyHintUpdateResponseResultValue = "off" -) - -type ZoneSettingEarlyHintListResponse struct { - Errors []ZoneSettingEarlyHintListResponseError `json:"errors"` - Messages []ZoneSettingEarlyHintListResponseMessage `json:"messages"` - // When enabled, Cloudflare will attempt to speed up overall page loads by serving - // `103` responses with `Link` headers from the final response. Refer to - // [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for - // more information. - Result ZoneSettingEarlyHintListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingEarlyHintListResponseJSON `json:"-"` -} - -// zoneSettingEarlyHintListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingEarlyHintListResponse] -type zoneSettingEarlyHintListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEarlyHintListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEarlyHintListResponseErrorJSON `json:"-"` -} - -// zoneSettingEarlyHintListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintListResponseError] -type zoneSettingEarlyHintListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEarlyHintListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEarlyHintListResponseMessageJSON `json:"-"` -} - -// zoneSettingEarlyHintListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintListResponseMessage] -type zoneSettingEarlyHintListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, Cloudflare will attempt to speed up overall page loads by serving -// `103` responses with `Link` headers from the final response. Refer to -// [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for -// more information. -type ZoneSettingEarlyHintListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingEarlyHintListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEarlyHintListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEarlyHintListResponseResultValue `json:"value"` - JSON zoneSettingEarlyHintListResponseResultJSON `json:"-"` -} - -// zoneSettingEarlyHintListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingEarlyHintListResponseResult] -type zoneSettingEarlyHintListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEarlyHintListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingEarlyHintListResponseResultID string - -const ( - ZoneSettingEarlyHintListResponseResultIDEarlyHints ZoneSettingEarlyHintListResponseResultID = "early_hints" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEarlyHintListResponseResultEditable bool - -const ( - ZoneSettingEarlyHintListResponseResultEditableTrue ZoneSettingEarlyHintListResponseResultEditable = true - ZoneSettingEarlyHintListResponseResultEditableFalse ZoneSettingEarlyHintListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingEarlyHintListResponseResultValue string - -const ( - ZoneSettingEarlyHintListResponseResultValueOn ZoneSettingEarlyHintListResponseResultValue = "on" - ZoneSettingEarlyHintListResponseResultValueOff ZoneSettingEarlyHintListResponseResultValue = "off" -) - -type ZoneSettingEarlyHintUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingEarlyHintUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingEarlyHintUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingEarlyHintUpdateParamsValue string - -const ( - ZoneSettingEarlyHintUpdateParamsValueOn ZoneSettingEarlyHintUpdateParamsValue = "on" - ZoneSettingEarlyHintUpdateParamsValueOff ZoneSettingEarlyHintUpdateParamsValue = "off" -) diff --git a/zonesettingearlyhint_test.go b/zonesettingearlyhint_test.go deleted file mode 100644 index 8af6fa845b4..00000000000 --- a/zonesettingearlyhint_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingEarlyHintUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.EarlyHints.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingEarlyHintUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingEarlyHintUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingEarlyHintList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.EarlyHints.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingemailobfuscation.go b/zonesettingemailobfuscation.go deleted file mode 100644 index b5094994467..00000000000 --- a/zonesettingemailobfuscation.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingEmailObfuscationService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingEmailObfuscationService] method instead. -type ZoneSettingEmailObfuscationService struct { - Options []option.RequestOption -} - -// NewZoneSettingEmailObfuscationService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingEmailObfuscationService(opts ...option.RequestOption) (r *ZoneSettingEmailObfuscationService) { - r = &ZoneSettingEmailObfuscationService{} - r.Options = opts - return -} - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -func (r *ZoneSettingEmailObfuscationService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingEmailObfuscationUpdateParams, opts ...option.RequestOption) (res *ZoneSettingEmailObfuscationUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/email_obfuscation", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -func (r *ZoneSettingEmailObfuscationService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingEmailObfuscationListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/email_obfuscation", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingEmailObfuscationUpdateResponse struct { - Errors []ZoneSettingEmailObfuscationUpdateResponseError `json:"errors"` - Messages []ZoneSettingEmailObfuscationUpdateResponseMessage `json:"messages"` - // Encrypt email adresses on your web page from bots, while keeping them visible to - // humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - Result ZoneSettingEmailObfuscationUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingEmailObfuscationUpdateResponseJSON `json:"-"` -} - -// zoneSettingEmailObfuscationUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingEmailObfuscationUpdateResponse] -type zoneSettingEmailObfuscationUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEmailObfuscationUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEmailObfuscationUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingEmailObfuscationUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingEmailObfuscationUpdateResponseError] -type zoneSettingEmailObfuscationUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEmailObfuscationUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEmailObfuscationUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingEmailObfuscationUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingEmailObfuscationUpdateResponseMessage] -type zoneSettingEmailObfuscationUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -type ZoneSettingEmailObfuscationUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingEmailObfuscationUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEmailObfuscationUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEmailObfuscationUpdateResponseResultValue `json:"value"` - JSON zoneSettingEmailObfuscationUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingEmailObfuscationUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingEmailObfuscationUpdateResponseResult] -type zoneSettingEmailObfuscationUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingEmailObfuscationUpdateResponseResultID string - -const ( - ZoneSettingEmailObfuscationUpdateResponseResultIDEmailObfuscation ZoneSettingEmailObfuscationUpdateResponseResultID = "email_obfuscation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEmailObfuscationUpdateResponseResultEditable bool - -const ( - ZoneSettingEmailObfuscationUpdateResponseResultEditableTrue ZoneSettingEmailObfuscationUpdateResponseResultEditable = true - ZoneSettingEmailObfuscationUpdateResponseResultEditableFalse ZoneSettingEmailObfuscationUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingEmailObfuscationUpdateResponseResultValue string - -const ( - ZoneSettingEmailObfuscationUpdateResponseResultValueOn ZoneSettingEmailObfuscationUpdateResponseResultValue = "on" - ZoneSettingEmailObfuscationUpdateResponseResultValueOff ZoneSettingEmailObfuscationUpdateResponseResultValue = "off" -) - -type ZoneSettingEmailObfuscationListResponse struct { - Errors []ZoneSettingEmailObfuscationListResponseError `json:"errors"` - Messages []ZoneSettingEmailObfuscationListResponseMessage `json:"messages"` - // Encrypt email adresses on your web page from bots, while keeping them visible to - // humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). - Result ZoneSettingEmailObfuscationListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingEmailObfuscationListResponseJSON `json:"-"` -} - -// zoneSettingEmailObfuscationListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingEmailObfuscationListResponse] -type zoneSettingEmailObfuscationListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEmailObfuscationListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEmailObfuscationListResponseErrorJSON `json:"-"` -} - -// zoneSettingEmailObfuscationListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingEmailObfuscationListResponseError] -type zoneSettingEmailObfuscationListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingEmailObfuscationListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingEmailObfuscationListResponseMessageJSON `json:"-"` -} - -// zoneSettingEmailObfuscationListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingEmailObfuscationListResponseMessage] -type zoneSettingEmailObfuscationListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Encrypt email adresses on your web page from bots, while keeping them visible to -// humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). -type ZoneSettingEmailObfuscationListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingEmailObfuscationListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingEmailObfuscationListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingEmailObfuscationListResponseResultValue `json:"value"` - JSON zoneSettingEmailObfuscationListResponseResultJSON `json:"-"` -} - -// zoneSettingEmailObfuscationListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingEmailObfuscationListResponseResult] -type zoneSettingEmailObfuscationListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingEmailObfuscationListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingEmailObfuscationListResponseResultID string - -const ( - ZoneSettingEmailObfuscationListResponseResultIDEmailObfuscation ZoneSettingEmailObfuscationListResponseResultID = "email_obfuscation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingEmailObfuscationListResponseResultEditable bool - -const ( - ZoneSettingEmailObfuscationListResponseResultEditableTrue ZoneSettingEmailObfuscationListResponseResultEditable = true - ZoneSettingEmailObfuscationListResponseResultEditableFalse ZoneSettingEmailObfuscationListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingEmailObfuscationListResponseResultValue string - -const ( - ZoneSettingEmailObfuscationListResponseResultValueOn ZoneSettingEmailObfuscationListResponseResultValue = "on" - ZoneSettingEmailObfuscationListResponseResultValueOff ZoneSettingEmailObfuscationListResponseResultValue = "off" -) - -type ZoneSettingEmailObfuscationUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingEmailObfuscationUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingEmailObfuscationUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingEmailObfuscationUpdateParamsValue string - -const ( - ZoneSettingEmailObfuscationUpdateParamsValueOn ZoneSettingEmailObfuscationUpdateParamsValue = "on" - ZoneSettingEmailObfuscationUpdateParamsValueOff ZoneSettingEmailObfuscationUpdateParamsValue = "off" -) diff --git a/zonesettingemailobfuscation_test.go b/zonesettingemailobfuscation_test.go deleted file mode 100644 index 9934e009698..00000000000 --- a/zonesettingemailobfuscation_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingEmailObfuscationUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.EmailObfuscations.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingEmailObfuscationUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingEmailObfuscationUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingEmailObfuscationList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.EmailObfuscations.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingh2prioritization.go b/zonesettingh2prioritization.go deleted file mode 100644 index 586829b711a..00000000000 --- a/zonesettingh2prioritization.go +++ /dev/null @@ -1,341 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingH2PrioritizationService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingH2PrioritizationService] method instead. -type ZoneSettingH2PrioritizationService struct { - Options []option.RequestOption -} - -// NewZoneSettingH2PrioritizationService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingH2PrioritizationService(opts ...option.RequestOption) (r *ZoneSettingH2PrioritizationService) { - r = &ZoneSettingH2PrioritizationService{} - r.Options = opts - return -} - -// Gets HTTP/2 Edge Prioritization setting. -func (r *ZoneSettingH2PrioritizationService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingH2PrioritizationUpdateParams, opts ...option.RequestOption) (res *ZoneSettingH2PrioritizationUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/h2_prioritization", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets HTTP/2 Edge Prioritization setting. -func (r *ZoneSettingH2PrioritizationService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingH2PrioritizationListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/h2_prioritization", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingH2PrioritizationUpdateResponse struct { - Errors []ZoneSettingH2PrioritizationUpdateResponseError `json:"errors"` - Messages []ZoneSettingH2PrioritizationUpdateResponseMessage `json:"messages"` - // HTTP/2 Edge Prioritization optimises the delivery of resources served through - // HTTP/2 to improve page load performance. It also supports fine control of - // content delivery when used in conjunction with Workers. - Result ZoneSettingH2PrioritizationUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingH2PrioritizationUpdateResponseJSON `json:"-"` -} - -// zoneSettingH2PrioritizationUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingH2PrioritizationUpdateResponse] -type zoneSettingH2PrioritizationUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingH2PrioritizationUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingH2PrioritizationUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingH2PrioritizationUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingH2PrioritizationUpdateResponseError] -type zoneSettingH2PrioritizationUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingH2PrioritizationUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingH2PrioritizationUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingH2PrioritizationUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingH2PrioritizationUpdateResponseMessage] -type zoneSettingH2PrioritizationUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingH2PrioritizationUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingH2PrioritizationUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingH2PrioritizationUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingH2PrioritizationUpdateResponseResultValue `json:"value"` - JSON zoneSettingH2PrioritizationUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingH2PrioritizationUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingH2PrioritizationUpdateResponseResult] -type zoneSettingH2PrioritizationUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingH2PrioritizationUpdateResponseResultID string - -const ( - ZoneSettingH2PrioritizationUpdateResponseResultIDH2Prioritization ZoneSettingH2PrioritizationUpdateResponseResultID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingH2PrioritizationUpdateResponseResultEditable bool - -const ( - ZoneSettingH2PrioritizationUpdateResponseResultEditableTrue ZoneSettingH2PrioritizationUpdateResponseResultEditable = true - ZoneSettingH2PrioritizationUpdateResponseResultEditableFalse ZoneSettingH2PrioritizationUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingH2PrioritizationUpdateResponseResultValue string - -const ( - ZoneSettingH2PrioritizationUpdateResponseResultValueOn ZoneSettingH2PrioritizationUpdateResponseResultValue = "on" - ZoneSettingH2PrioritizationUpdateResponseResultValueOff ZoneSettingH2PrioritizationUpdateResponseResultValue = "off" - ZoneSettingH2PrioritizationUpdateResponseResultValueCustom ZoneSettingH2PrioritizationUpdateResponseResultValue = "custom" -) - -type ZoneSettingH2PrioritizationListResponse struct { - Errors []ZoneSettingH2PrioritizationListResponseError `json:"errors"` - Messages []ZoneSettingH2PrioritizationListResponseMessage `json:"messages"` - // HTTP/2 Edge Prioritization optimises the delivery of resources served through - // HTTP/2 to improve page load performance. It also supports fine control of - // content delivery when used in conjunction with Workers. - Result ZoneSettingH2PrioritizationListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingH2PrioritizationListResponseJSON `json:"-"` -} - -// zoneSettingH2PrioritizationListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingH2PrioritizationListResponse] -type zoneSettingH2PrioritizationListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingH2PrioritizationListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingH2PrioritizationListResponseErrorJSON `json:"-"` -} - -// zoneSettingH2PrioritizationListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingH2PrioritizationListResponseError] -type zoneSettingH2PrioritizationListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingH2PrioritizationListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingH2PrioritizationListResponseMessageJSON `json:"-"` -} - -// zoneSettingH2PrioritizationListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingH2PrioritizationListResponseMessage] -type zoneSettingH2PrioritizationListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingH2PrioritizationListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingH2PrioritizationListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingH2PrioritizationListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingH2PrioritizationListResponseResultValue `json:"value"` - JSON zoneSettingH2PrioritizationListResponseResultJSON `json:"-"` -} - -// zoneSettingH2PrioritizationListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingH2PrioritizationListResponseResult] -type zoneSettingH2PrioritizationListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingH2PrioritizationListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingH2PrioritizationListResponseResultID string - -const ( - ZoneSettingH2PrioritizationListResponseResultIDH2Prioritization ZoneSettingH2PrioritizationListResponseResultID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingH2PrioritizationListResponseResultEditable bool - -const ( - ZoneSettingH2PrioritizationListResponseResultEditableTrue ZoneSettingH2PrioritizationListResponseResultEditable = true - ZoneSettingH2PrioritizationListResponseResultEditableFalse ZoneSettingH2PrioritizationListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingH2PrioritizationListResponseResultValue string - -const ( - ZoneSettingH2PrioritizationListResponseResultValueOn ZoneSettingH2PrioritizationListResponseResultValue = "on" - ZoneSettingH2PrioritizationListResponseResultValueOff ZoneSettingH2PrioritizationListResponseResultValue = "off" - ZoneSettingH2PrioritizationListResponseResultValueCustom ZoneSettingH2PrioritizationListResponseResultValue = "custom" -) - -type ZoneSettingH2PrioritizationUpdateParams struct { - // HTTP/2 Edge Prioritization optimises the delivery of resources served through - // HTTP/2 to improve page load performance. It also supports fine control of - // content delivery when used in conjunction with Workers. - Value param.Field[ZoneSettingH2PrioritizationUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingH2PrioritizationUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// HTTP/2 Edge Prioritization optimises the delivery of resources served through -// HTTP/2 to improve page load performance. It also supports fine control of -// content delivery when used in conjunction with Workers. -type ZoneSettingH2PrioritizationUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingH2PrioritizationUpdateParamsValueID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingH2PrioritizationUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingH2PrioritizationUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingH2PrioritizationUpdateParamsValueID string - -const ( - ZoneSettingH2PrioritizationUpdateParamsValueIDH2Prioritization ZoneSettingH2PrioritizationUpdateParamsValueID = "h2_prioritization" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingH2PrioritizationUpdateParamsValueEditable bool - -const ( - ZoneSettingH2PrioritizationUpdateParamsValueEditableTrue ZoneSettingH2PrioritizationUpdateParamsValueEditable = true - ZoneSettingH2PrioritizationUpdateParamsValueEditableFalse ZoneSettingH2PrioritizationUpdateParamsValueEditable = false -) - -// Value of the zone setting. -type ZoneSettingH2PrioritizationUpdateParamsValueValue string - -const ( - ZoneSettingH2PrioritizationUpdateParamsValueValueOn ZoneSettingH2PrioritizationUpdateParamsValueValue = "on" - ZoneSettingH2PrioritizationUpdateParamsValueValueOff ZoneSettingH2PrioritizationUpdateParamsValueValue = "off" - ZoneSettingH2PrioritizationUpdateParamsValueValueCustom ZoneSettingH2PrioritizationUpdateParamsValueValue = "custom" -) diff --git a/zonesettingh2prioritization_test.go b/zonesettingh2prioritization_test.go deleted file mode 100644 index 89b5ff2e009..00000000000 --- a/zonesettingh2prioritization_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingH2PrioritizationUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.H2Prioritizations.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingH2PrioritizationUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingH2PrioritizationUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingH2PrioritizationUpdateParamsValueIDH2Prioritization), - Value: cloudflare.F(cloudflare.ZoneSettingH2PrioritizationUpdateParamsValueValueOn), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingH2PrioritizationList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.H2Prioritizations.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettinghotlinkprotection.go b/zonesettinghotlinkprotection.go deleted file mode 100644 index 02ef71676ea..00000000000 --- a/zonesettinghotlinkprotection.go +++ /dev/null @@ -1,334 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingHotlinkProtectionService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingHotlinkProtectionService] method instead. -type ZoneSettingHotlinkProtectionService struct { - Options []option.RequestOption -} - -// NewZoneSettingHotlinkProtectionService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingHotlinkProtectionService(opts ...option.RequestOption) (r *ZoneSettingHotlinkProtectionService) { - r = &ZoneSettingHotlinkProtectionService{} - r.Options = opts - return -} - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -func (r *ZoneSettingHotlinkProtectionService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingHotlinkProtectionUpdateParams, opts ...option.RequestOption) (res *ZoneSettingHotlinkProtectionUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/hotlink_protection", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -func (r *ZoneSettingHotlinkProtectionService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingHotlinkProtectionListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/hotlink_protection", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingHotlinkProtectionUpdateResponse struct { - Errors []ZoneSettingHotlinkProtectionUpdateResponseError `json:"errors"` - Messages []ZoneSettingHotlinkProtectionUpdateResponseMessage `json:"messages"` - // When enabled, the Hotlink Protection option ensures that other sites cannot suck - // up your bandwidth by building pages that use images hosted on your site. Anytime - // a request for an image on your site hits Cloudflare, we check to ensure that - // it's not another site requesting them. People will still be able to download and - // view images from your page, but other sites won't be able to steal them for use - // on their own pages. - // (https://support.cloudflare.com/hc/en-us/articles/200170026). - Result ZoneSettingHotlinkProtectionUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHotlinkProtectionUpdateResponseJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingHotlinkProtectionUpdateResponse] -type zoneSettingHotlinkProtectionUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHotlinkProtectionUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHotlinkProtectionUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingHotlinkProtectionUpdateResponseError] -type zoneSettingHotlinkProtectionUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHotlinkProtectionUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHotlinkProtectionUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingHotlinkProtectionUpdateResponseMessage] -type zoneSettingHotlinkProtectionUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -type ZoneSettingHotlinkProtectionUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHotlinkProtectionUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHotlinkProtectionUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingHotlinkProtectionUpdateResponseResultValue `json:"value"` - JSON zoneSettingHotlinkProtectionUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingHotlinkProtectionUpdateResponseResult] -type zoneSettingHotlinkProtectionUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHotlinkProtectionUpdateResponseResultID string - -const ( - ZoneSettingHotlinkProtectionUpdateResponseResultIDHotlinkProtection ZoneSettingHotlinkProtectionUpdateResponseResultID = "hotlink_protection" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHotlinkProtectionUpdateResponseResultEditable bool - -const ( - ZoneSettingHotlinkProtectionUpdateResponseResultEditableTrue ZoneSettingHotlinkProtectionUpdateResponseResultEditable = true - ZoneSettingHotlinkProtectionUpdateResponseResultEditableFalse ZoneSettingHotlinkProtectionUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingHotlinkProtectionUpdateResponseResultValue string - -const ( - ZoneSettingHotlinkProtectionUpdateResponseResultValueOn ZoneSettingHotlinkProtectionUpdateResponseResultValue = "on" - ZoneSettingHotlinkProtectionUpdateResponseResultValueOff ZoneSettingHotlinkProtectionUpdateResponseResultValue = "off" -) - -type ZoneSettingHotlinkProtectionListResponse struct { - Errors []ZoneSettingHotlinkProtectionListResponseError `json:"errors"` - Messages []ZoneSettingHotlinkProtectionListResponseMessage `json:"messages"` - // When enabled, the Hotlink Protection option ensures that other sites cannot suck - // up your bandwidth by building pages that use images hosted on your site. Anytime - // a request for an image on your site hits Cloudflare, we check to ensure that - // it's not another site requesting them. People will still be able to download and - // view images from your page, but other sites won't be able to steal them for use - // on their own pages. - // (https://support.cloudflare.com/hc/en-us/articles/200170026). - Result ZoneSettingHotlinkProtectionListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHotlinkProtectionListResponseJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingHotlinkProtectionListResponse] -type zoneSettingHotlinkProtectionListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHotlinkProtectionListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHotlinkProtectionListResponseErrorJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingHotlinkProtectionListResponseError] -type zoneSettingHotlinkProtectionListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHotlinkProtectionListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHotlinkProtectionListResponseMessageJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingHotlinkProtectionListResponseMessage] -type zoneSettingHotlinkProtectionListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When enabled, the Hotlink Protection option ensures that other sites cannot suck -// up your bandwidth by building pages that use images hosted on your site. Anytime -// a request for an image on your site hits Cloudflare, we check to ensure that -// it's not another site requesting them. People will still be able to download and -// view images from your page, but other sites won't be able to steal them for use -// on their own pages. -// (https://support.cloudflare.com/hc/en-us/articles/200170026). -type ZoneSettingHotlinkProtectionListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHotlinkProtectionListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHotlinkProtectionListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingHotlinkProtectionListResponseResultValue `json:"value"` - JSON zoneSettingHotlinkProtectionListResponseResultJSON `json:"-"` -} - -// zoneSettingHotlinkProtectionListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingHotlinkProtectionListResponseResult] -type zoneSettingHotlinkProtectionListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHotlinkProtectionListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHotlinkProtectionListResponseResultID string - -const ( - ZoneSettingHotlinkProtectionListResponseResultIDHotlinkProtection ZoneSettingHotlinkProtectionListResponseResultID = "hotlink_protection" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHotlinkProtectionListResponseResultEditable bool - -const ( - ZoneSettingHotlinkProtectionListResponseResultEditableTrue ZoneSettingHotlinkProtectionListResponseResultEditable = true - ZoneSettingHotlinkProtectionListResponseResultEditableFalse ZoneSettingHotlinkProtectionListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingHotlinkProtectionListResponseResultValue string - -const ( - ZoneSettingHotlinkProtectionListResponseResultValueOn ZoneSettingHotlinkProtectionListResponseResultValue = "on" - ZoneSettingHotlinkProtectionListResponseResultValueOff ZoneSettingHotlinkProtectionListResponseResultValue = "off" -) - -type ZoneSettingHotlinkProtectionUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingHotlinkProtectionUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingHotlinkProtectionUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingHotlinkProtectionUpdateParamsValue string - -const ( - ZoneSettingHotlinkProtectionUpdateParamsValueOn ZoneSettingHotlinkProtectionUpdateParamsValue = "on" - ZoneSettingHotlinkProtectionUpdateParamsValueOff ZoneSettingHotlinkProtectionUpdateParamsValue = "off" -) diff --git a/zonesettinghotlinkprotection_test.go b/zonesettinghotlinkprotection_test.go deleted file mode 100644 index c553fd6e707..00000000000 --- a/zonesettinghotlinkprotection_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingHotlinkProtectionUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HotlinkProtections.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingHotlinkProtectionUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingHotlinkProtectionUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingHotlinkProtectionList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HotlinkProtections.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettinghttp2.go b/zonesettinghttp2.go deleted file mode 100644 index df64040137e..00000000000 --- a/zonesettinghttp2.go +++ /dev/null @@ -1,298 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingHTTP2Service contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingHTTP2Service] method -// instead. -type ZoneSettingHTTP2Service struct { - Options []option.RequestOption -} - -// NewZoneSettingHTTP2Service generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingHTTP2Service(opts ...option.RequestOption) (r *ZoneSettingHTTP2Service) { - r = &ZoneSettingHTTP2Service{} - r.Options = opts - return -} - -// Value of the HTTP2 setting. -func (r *ZoneSettingHTTP2Service) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingHTTP2UpdateParams, opts ...option.RequestOption) (res *ZoneSettingHTTP2UpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/http2", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Value of the HTTP2 setting. -func (r *ZoneSettingHTTP2Service) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingHTTP2ListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/http2", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingHTTP2UpdateResponse struct { - Errors []ZoneSettingHTTP2UpdateResponseError `json:"errors"` - Messages []ZoneSettingHTTP2UpdateResponseMessage `json:"messages"` - // HTTP2 enabled for this zone. - Result ZoneSettingHTTP2UpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHTTP2UpdateResponseJSON `json:"-"` -} - -// zoneSettingHTTP2UpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP2UpdateResponse] -type zoneSettingHTTP2UpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2UpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP2UpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP2UpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingHTTP2UpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP2UpdateResponseError] -type zoneSettingHTTP2UpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2UpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP2UpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP2UpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingHTTP2UpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP2UpdateResponseMessage] -type zoneSettingHTTP2UpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2UpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP2 enabled for this zone. -type ZoneSettingHTTP2UpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHTTP2UpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHTTP2UpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP2 setting. - Value ZoneSettingHTTP2UpdateResponseResultValue `json:"value"` - JSON zoneSettingHTTP2UpdateResponseResultJSON `json:"-"` -} - -// zoneSettingHTTP2UpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP2UpdateResponseResult] -type zoneSettingHTTP2UpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2UpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHTTP2UpdateResponseResultID string - -const ( - ZoneSettingHTTP2UpdateResponseResultIDHTTP2 ZoneSettingHTTP2UpdateResponseResultID = "http2" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHTTP2UpdateResponseResultEditable bool - -const ( - ZoneSettingHTTP2UpdateResponseResultEditableTrue ZoneSettingHTTP2UpdateResponseResultEditable = true - ZoneSettingHTTP2UpdateResponseResultEditableFalse ZoneSettingHTTP2UpdateResponseResultEditable = false -) - -// Value of the HTTP2 setting. -type ZoneSettingHTTP2UpdateResponseResultValue string - -const ( - ZoneSettingHTTP2UpdateResponseResultValueOn ZoneSettingHTTP2UpdateResponseResultValue = "on" - ZoneSettingHTTP2UpdateResponseResultValueOff ZoneSettingHTTP2UpdateResponseResultValue = "off" -) - -type ZoneSettingHTTP2ListResponse struct { - Errors []ZoneSettingHTTP2ListResponseError `json:"errors"` - Messages []ZoneSettingHTTP2ListResponseMessage `json:"messages"` - // HTTP2 enabled for this zone. - Result ZoneSettingHTTP2ListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHTTP2ListResponseJSON `json:"-"` -} - -// zoneSettingHTTP2ListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP2ListResponse] -type zoneSettingHTTP2ListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2ListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP2ListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP2ListResponseErrorJSON `json:"-"` -} - -// zoneSettingHTTP2ListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP2ListResponseError] -type zoneSettingHTTP2ListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2ListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP2ListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP2ListResponseMessageJSON `json:"-"` -} - -// zoneSettingHTTP2ListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP2ListResponseMessage] -type zoneSettingHTTP2ListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2ListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP2 enabled for this zone. -type ZoneSettingHTTP2ListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHTTP2ListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHTTP2ListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP2 setting. - Value ZoneSettingHTTP2ListResponseResultValue `json:"value"` - JSON zoneSettingHTTP2ListResponseResultJSON `json:"-"` -} - -// zoneSettingHTTP2ListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP2ListResponseResult] -type zoneSettingHTTP2ListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP2ListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHTTP2ListResponseResultID string - -const ( - ZoneSettingHTTP2ListResponseResultIDHTTP2 ZoneSettingHTTP2ListResponseResultID = "http2" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHTTP2ListResponseResultEditable bool - -const ( - ZoneSettingHTTP2ListResponseResultEditableTrue ZoneSettingHTTP2ListResponseResultEditable = true - ZoneSettingHTTP2ListResponseResultEditableFalse ZoneSettingHTTP2ListResponseResultEditable = false -) - -// Value of the HTTP2 setting. -type ZoneSettingHTTP2ListResponseResultValue string - -const ( - ZoneSettingHTTP2ListResponseResultValueOn ZoneSettingHTTP2ListResponseResultValue = "on" - ZoneSettingHTTP2ListResponseResultValueOff ZoneSettingHTTP2ListResponseResultValue = "off" -) - -type ZoneSettingHTTP2UpdateParams struct { - // Value of the HTTP2 setting. - Value param.Field[ZoneSettingHTTP2UpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingHTTP2UpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the HTTP2 setting. -type ZoneSettingHTTP2UpdateParamsValue string - -const ( - ZoneSettingHTTP2UpdateParamsValueOn ZoneSettingHTTP2UpdateParamsValue = "on" - ZoneSettingHTTP2UpdateParamsValueOff ZoneSettingHTTP2UpdateParamsValue = "off" -) diff --git a/zonesettinghttp2_test.go b/zonesettinghttp2_test.go deleted file mode 100644 index 05ff807affc..00000000000 --- a/zonesettinghttp2_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingHTTP2Update(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HTTP2s.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingHTTP2UpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingHTTP2UpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingHTTP2List(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HTTP2s.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettinghttp3.go b/zonesettinghttp3.go deleted file mode 100644 index ffaa6f10729..00000000000 --- a/zonesettinghttp3.go +++ /dev/null @@ -1,298 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingHTTP3Service contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingHTTP3Service] method -// instead. -type ZoneSettingHTTP3Service struct { - Options []option.RequestOption -} - -// NewZoneSettingHTTP3Service generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingHTTP3Service(opts ...option.RequestOption) (r *ZoneSettingHTTP3Service) { - r = &ZoneSettingHTTP3Service{} - r.Options = opts - return -} - -// Value of the HTTP3 setting. -func (r *ZoneSettingHTTP3Service) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingHTTP3UpdateParams, opts ...option.RequestOption) (res *ZoneSettingHTTP3UpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/http3", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Value of the HTTP3 setting. -func (r *ZoneSettingHTTP3Service) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingHTTP3ListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/http3", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingHTTP3UpdateResponse struct { - Errors []ZoneSettingHTTP3UpdateResponseError `json:"errors"` - Messages []ZoneSettingHTTP3UpdateResponseMessage `json:"messages"` - // HTTP3 enabled for this zone. - Result ZoneSettingHTTP3UpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHTTP3UpdateResponseJSON `json:"-"` -} - -// zoneSettingHTTP3UpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP3UpdateResponse] -type zoneSettingHTTP3UpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3UpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP3UpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP3UpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingHTTP3UpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP3UpdateResponseError] -type zoneSettingHTTP3UpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3UpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP3UpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP3UpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingHTTP3UpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP3UpdateResponseMessage] -type zoneSettingHTTP3UpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3UpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP3 enabled for this zone. -type ZoneSettingHTTP3UpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHTTP3UpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHTTP3UpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP3 setting. - Value ZoneSettingHTTP3UpdateResponseResultValue `json:"value"` - JSON zoneSettingHTTP3UpdateResponseResultJSON `json:"-"` -} - -// zoneSettingHTTP3UpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP3UpdateResponseResult] -type zoneSettingHTTP3UpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3UpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHTTP3UpdateResponseResultID string - -const ( - ZoneSettingHTTP3UpdateResponseResultIDHTTP3 ZoneSettingHTTP3UpdateResponseResultID = "http3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHTTP3UpdateResponseResultEditable bool - -const ( - ZoneSettingHTTP3UpdateResponseResultEditableTrue ZoneSettingHTTP3UpdateResponseResultEditable = true - ZoneSettingHTTP3UpdateResponseResultEditableFalse ZoneSettingHTTP3UpdateResponseResultEditable = false -) - -// Value of the HTTP3 setting. -type ZoneSettingHTTP3UpdateResponseResultValue string - -const ( - ZoneSettingHTTP3UpdateResponseResultValueOn ZoneSettingHTTP3UpdateResponseResultValue = "on" - ZoneSettingHTTP3UpdateResponseResultValueOff ZoneSettingHTTP3UpdateResponseResultValue = "off" -) - -type ZoneSettingHTTP3ListResponse struct { - Errors []ZoneSettingHTTP3ListResponseError `json:"errors"` - Messages []ZoneSettingHTTP3ListResponseMessage `json:"messages"` - // HTTP3 enabled for this zone. - Result ZoneSettingHTTP3ListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingHTTP3ListResponseJSON `json:"-"` -} - -// zoneSettingHTTP3ListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP3ListResponse] -type zoneSettingHTTP3ListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3ListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP3ListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP3ListResponseErrorJSON `json:"-"` -} - -// zoneSettingHTTP3ListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP3ListResponseError] -type zoneSettingHTTP3ListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3ListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingHTTP3ListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingHTTP3ListResponseMessageJSON `json:"-"` -} - -// zoneSettingHTTP3ListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingHTTP3ListResponseMessage] -type zoneSettingHTTP3ListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3ListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// HTTP3 enabled for this zone. -type ZoneSettingHTTP3ListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingHTTP3ListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingHTTP3ListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the HTTP3 setting. - Value ZoneSettingHTTP3ListResponseResultValue `json:"value"` - JSON zoneSettingHTTP3ListResponseResultJSON `json:"-"` -} - -// zoneSettingHTTP3ListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingHTTP3ListResponseResult] -type zoneSettingHTTP3ListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingHTTP3ListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingHTTP3ListResponseResultID string - -const ( - ZoneSettingHTTP3ListResponseResultIDHTTP3 ZoneSettingHTTP3ListResponseResultID = "http3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingHTTP3ListResponseResultEditable bool - -const ( - ZoneSettingHTTP3ListResponseResultEditableTrue ZoneSettingHTTP3ListResponseResultEditable = true - ZoneSettingHTTP3ListResponseResultEditableFalse ZoneSettingHTTP3ListResponseResultEditable = false -) - -// Value of the HTTP3 setting. -type ZoneSettingHTTP3ListResponseResultValue string - -const ( - ZoneSettingHTTP3ListResponseResultValueOn ZoneSettingHTTP3ListResponseResultValue = "on" - ZoneSettingHTTP3ListResponseResultValueOff ZoneSettingHTTP3ListResponseResultValue = "off" -) - -type ZoneSettingHTTP3UpdateParams struct { - // Value of the HTTP3 setting. - Value param.Field[ZoneSettingHTTP3UpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingHTTP3UpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the HTTP3 setting. -type ZoneSettingHTTP3UpdateParamsValue string - -const ( - ZoneSettingHTTP3UpdateParamsValueOn ZoneSettingHTTP3UpdateParamsValue = "on" - ZoneSettingHTTP3UpdateParamsValueOff ZoneSettingHTTP3UpdateParamsValue = "off" -) diff --git a/zonesettinghttp3_test.go b/zonesettinghttp3_test.go deleted file mode 100644 index 466873dc8f5..00000000000 --- a/zonesettinghttp3_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingHTTP3Update(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HTTP3s.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingHTTP3UpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingHTTP3UpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingHTTP3List(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.HTTP3s.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingimageresizing.go b/zonesettingimageresizing.go deleted file mode 100644 index 2622272ad47..00000000000 --- a/zonesettingimageresizing.go +++ /dev/null @@ -1,353 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingImageResizingService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingImageResizingService] method instead. -type ZoneSettingImageResizingService struct { - Options []option.RequestOption -} - -// NewZoneSettingImageResizingService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingImageResizingService(opts ...option.RequestOption) (r *ZoneSettingImageResizingService) { - r = &ZoneSettingImageResizingService{} - r.Options = opts - return -} - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -func (r *ZoneSettingImageResizingService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingImageResizingUpdateParams, opts ...option.RequestOption) (res *ZoneSettingImageResizingUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/image_resizing", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -func (r *ZoneSettingImageResizingService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingImageResizingListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/image_resizing", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingImageResizingUpdateResponse struct { - Errors []ZoneSettingImageResizingUpdateResponseError `json:"errors"` - Messages []ZoneSettingImageResizingUpdateResponseMessage `json:"messages"` - // Image Resizing provides on-demand resizing, conversion and optimisation for - // images served through Cloudflare's network. Refer to the - // [Image Resizing documentation](https://developers.cloudflare.com/images/) for - // more information. - Result ZoneSettingImageResizingUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingImageResizingUpdateResponseJSON `json:"-"` -} - -// zoneSettingImageResizingUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingImageResizingUpdateResponse] -type zoneSettingImageResizingUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingImageResizingUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingImageResizingUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingImageResizingUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingImageResizingUpdateResponseError] -type zoneSettingImageResizingUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingImageResizingUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingImageResizingUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingImageResizingUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingImageResizingUpdateResponseMessage] -type zoneSettingImageResizingUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingImageResizingUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingImageResizingUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingImageResizingUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value ZoneSettingImageResizingUpdateResponseResultValue `json:"value"` - JSON zoneSettingImageResizingUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingImageResizingUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingImageResizingUpdateResponseResult] -type zoneSettingImageResizingUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingImageResizingUpdateResponseResultID string - -const ( - ZoneSettingImageResizingUpdateResponseResultIDImageResizing ZoneSettingImageResizingUpdateResponseResultID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingImageResizingUpdateResponseResultEditable bool - -const ( - ZoneSettingImageResizingUpdateResponseResultEditableTrue ZoneSettingImageResizingUpdateResponseResultEditable = true - ZoneSettingImageResizingUpdateResponseResultEditableFalse ZoneSettingImageResizingUpdateResponseResultEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingImageResizingUpdateResponseResultValue string - -const ( - ZoneSettingImageResizingUpdateResponseResultValueOn ZoneSettingImageResizingUpdateResponseResultValue = "on" - ZoneSettingImageResizingUpdateResponseResultValueOff ZoneSettingImageResizingUpdateResponseResultValue = "off" - ZoneSettingImageResizingUpdateResponseResultValueOpen ZoneSettingImageResizingUpdateResponseResultValue = "open" -) - -type ZoneSettingImageResizingListResponse struct { - Errors []ZoneSettingImageResizingListResponseError `json:"errors"` - Messages []ZoneSettingImageResizingListResponseMessage `json:"messages"` - // Image Resizing provides on-demand resizing, conversion and optimisation for - // images served through Cloudflare's network. Refer to the - // [Image Resizing documentation](https://developers.cloudflare.com/images/) for - // more information. - Result ZoneSettingImageResizingListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingImageResizingListResponseJSON `json:"-"` -} - -// zoneSettingImageResizingListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingImageResizingListResponse] -type zoneSettingImageResizingListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingImageResizingListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingImageResizingListResponseErrorJSON `json:"-"` -} - -// zoneSettingImageResizingListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingImageResizingListResponseError] -type zoneSettingImageResizingListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingImageResizingListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingImageResizingListResponseMessageJSON `json:"-"` -} - -// zoneSettingImageResizingListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingImageResizingListResponseMessage] -type zoneSettingImageResizingListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingImageResizingListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingImageResizingListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingImageResizingListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value ZoneSettingImageResizingListResponseResultValue `json:"value"` - JSON zoneSettingImageResizingListResponseResultJSON `json:"-"` -} - -// zoneSettingImageResizingListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingImageResizingListResponseResult] -type zoneSettingImageResizingListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingImageResizingListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingImageResizingListResponseResultID string - -const ( - ZoneSettingImageResizingListResponseResultIDImageResizing ZoneSettingImageResizingListResponseResultID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingImageResizingListResponseResultEditable bool - -const ( - ZoneSettingImageResizingListResponseResultEditableTrue ZoneSettingImageResizingListResponseResultEditable = true - ZoneSettingImageResizingListResponseResultEditableFalse ZoneSettingImageResizingListResponseResultEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingImageResizingListResponseResultValue string - -const ( - ZoneSettingImageResizingListResponseResultValueOn ZoneSettingImageResizingListResponseResultValue = "on" - ZoneSettingImageResizingListResponseResultValueOff ZoneSettingImageResizingListResponseResultValue = "off" - ZoneSettingImageResizingListResponseResultValueOpen ZoneSettingImageResizingListResponseResultValue = "open" -) - -type ZoneSettingImageResizingUpdateParams struct { - // Image Resizing provides on-demand resizing, conversion and optimisation for - // images served through Cloudflare's network. Refer to the - // [Image Resizing documentation](https://developers.cloudflare.com/images/) for - // more information. - Value param.Field[ZoneSettingImageResizingUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingImageResizingUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Image Resizing provides on-demand resizing, conversion and optimisation for -// images served through Cloudflare's network. Refer to the -// [Image Resizing documentation](https://developers.cloudflare.com/images/) for -// more information. -type ZoneSettingImageResizingUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingImageResizingUpdateParamsValueID] `json:"id"` - // Whether the feature is enabled, disabled, or enabled in `open proxy` mode. - Value param.Field[ZoneSettingImageResizingUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingImageResizingUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingImageResizingUpdateParamsValueID string - -const ( - ZoneSettingImageResizingUpdateParamsValueIDImageResizing ZoneSettingImageResizingUpdateParamsValueID = "image_resizing" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingImageResizingUpdateParamsValueEditable bool - -const ( - ZoneSettingImageResizingUpdateParamsValueEditableTrue ZoneSettingImageResizingUpdateParamsValueEditable = true - ZoneSettingImageResizingUpdateParamsValueEditableFalse ZoneSettingImageResizingUpdateParamsValueEditable = false -) - -// Whether the feature is enabled, disabled, or enabled in `open proxy` mode. -type ZoneSettingImageResizingUpdateParamsValueValue string - -const ( - ZoneSettingImageResizingUpdateParamsValueValueOn ZoneSettingImageResizingUpdateParamsValueValue = "on" - ZoneSettingImageResizingUpdateParamsValueValueOff ZoneSettingImageResizingUpdateParamsValueValue = "off" - ZoneSettingImageResizingUpdateParamsValueValueOpen ZoneSettingImageResizingUpdateParamsValueValue = "open" -) diff --git a/zonesettingimageresizing_test.go b/zonesettingimageresizing_test.go deleted file mode 100644 index d098d256d07..00000000000 --- a/zonesettingimageresizing_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingImageResizingUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ImageResizings.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingImageResizingUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingImageResizingUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingImageResizingUpdateParamsValueIDImageResizing), - Value: cloudflare.F(cloudflare.ZoneSettingImageResizingUpdateParamsValueValueOn), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingImageResizingList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ImageResizings.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingipgeolocation.go b/zonesettingipgeolocation.go deleted file mode 100644 index 62c02cf720b..00000000000 --- a/zonesettingipgeolocation.go +++ /dev/null @@ -1,310 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingIPGeolocationService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingIPGeolocationService] method instead. -type ZoneSettingIPGeolocationService struct { - Options []option.RequestOption -} - -// NewZoneSettingIPGeolocationService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingIPGeolocationService(opts ...option.RequestOption) (r *ZoneSettingIPGeolocationService) { - r = &ZoneSettingIPGeolocationService{} - r.Options = opts - return -} - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -func (r *ZoneSettingIPGeolocationService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingIPGeolocationUpdateParams, opts ...option.RequestOption) (res *ZoneSettingIPGeolocationUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ip_geolocation", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -func (r *ZoneSettingIPGeolocationService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingIPGeolocationListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ip_geolocation", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingIPGeolocationUpdateResponse struct { - Errors []ZoneSettingIPGeolocationUpdateResponseError `json:"errors"` - Messages []ZoneSettingIPGeolocationUpdateResponseMessage `json:"messages"` - // Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - // pass the country code to you. - // (https://support.cloudflare.com/hc/en-us/articles/200168236). - Result ZoneSettingIPGeolocationUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingIPGeolocationUpdateResponseJSON `json:"-"` -} - -// zoneSettingIPGeolocationUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingIPGeolocationUpdateResponse] -type zoneSettingIPGeolocationUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPGeolocationUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPGeolocationUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingIPGeolocationUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingIPGeolocationUpdateResponseError] -type zoneSettingIPGeolocationUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPGeolocationUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPGeolocationUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingIPGeolocationUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingIPGeolocationUpdateResponseMessage] -type zoneSettingIPGeolocationUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -type ZoneSettingIPGeolocationUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingIPGeolocationUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingIPGeolocationUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingIPGeolocationUpdateResponseResultValue `json:"value"` - JSON zoneSettingIPGeolocationUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingIPGeolocationUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingIPGeolocationUpdateResponseResult] -type zoneSettingIPGeolocationUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingIPGeolocationUpdateResponseResultID string - -const ( - ZoneSettingIPGeolocationUpdateResponseResultIDIPGeolocation ZoneSettingIPGeolocationUpdateResponseResultID = "ip_geolocation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingIPGeolocationUpdateResponseResultEditable bool - -const ( - ZoneSettingIPGeolocationUpdateResponseResultEditableTrue ZoneSettingIPGeolocationUpdateResponseResultEditable = true - ZoneSettingIPGeolocationUpdateResponseResultEditableFalse ZoneSettingIPGeolocationUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingIPGeolocationUpdateResponseResultValue string - -const ( - ZoneSettingIPGeolocationUpdateResponseResultValueOn ZoneSettingIPGeolocationUpdateResponseResultValue = "on" - ZoneSettingIPGeolocationUpdateResponseResultValueOff ZoneSettingIPGeolocationUpdateResponseResultValue = "off" -) - -type ZoneSettingIPGeolocationListResponse struct { - Errors []ZoneSettingIPGeolocationListResponseError `json:"errors"` - Messages []ZoneSettingIPGeolocationListResponseMessage `json:"messages"` - // Enable IP Geolocation to have Cloudflare geolocate visitors to your website and - // pass the country code to you. - // (https://support.cloudflare.com/hc/en-us/articles/200168236). - Result ZoneSettingIPGeolocationListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingIPGeolocationListResponseJSON `json:"-"` -} - -// zoneSettingIPGeolocationListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingIPGeolocationListResponse] -type zoneSettingIPGeolocationListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPGeolocationListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPGeolocationListResponseErrorJSON `json:"-"` -} - -// zoneSettingIPGeolocationListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingIPGeolocationListResponseError] -type zoneSettingIPGeolocationListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPGeolocationListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPGeolocationListResponseMessageJSON `json:"-"` -} - -// zoneSettingIPGeolocationListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingIPGeolocationListResponseMessage] -type zoneSettingIPGeolocationListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable IP Geolocation to have Cloudflare geolocate visitors to your website and -// pass the country code to you. -// (https://support.cloudflare.com/hc/en-us/articles/200168236). -type ZoneSettingIPGeolocationListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingIPGeolocationListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingIPGeolocationListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingIPGeolocationListResponseResultValue `json:"value"` - JSON zoneSettingIPGeolocationListResponseResultJSON `json:"-"` -} - -// zoneSettingIPGeolocationListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingIPGeolocationListResponseResult] -type zoneSettingIPGeolocationListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPGeolocationListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingIPGeolocationListResponseResultID string - -const ( - ZoneSettingIPGeolocationListResponseResultIDIPGeolocation ZoneSettingIPGeolocationListResponseResultID = "ip_geolocation" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingIPGeolocationListResponseResultEditable bool - -const ( - ZoneSettingIPGeolocationListResponseResultEditableTrue ZoneSettingIPGeolocationListResponseResultEditable = true - ZoneSettingIPGeolocationListResponseResultEditableFalse ZoneSettingIPGeolocationListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingIPGeolocationListResponseResultValue string - -const ( - ZoneSettingIPGeolocationListResponseResultValueOn ZoneSettingIPGeolocationListResponseResultValue = "on" - ZoneSettingIPGeolocationListResponseResultValueOff ZoneSettingIPGeolocationListResponseResultValue = "off" -) - -type ZoneSettingIPGeolocationUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingIPGeolocationUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingIPGeolocationUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingIPGeolocationUpdateParamsValue string - -const ( - ZoneSettingIPGeolocationUpdateParamsValueOn ZoneSettingIPGeolocationUpdateParamsValue = "on" - ZoneSettingIPGeolocationUpdateParamsValueOff ZoneSettingIPGeolocationUpdateParamsValue = "off" -) diff --git a/zonesettingipgeolocation_test.go b/zonesettingipgeolocation_test.go deleted file mode 100644 index 2250f8a94b3..00000000000 --- a/zonesettingipgeolocation_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingIPGeolocationUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.IPGeolocations.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingIPGeolocationUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingIPGeolocationUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingIPGeolocationList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.IPGeolocations.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingipv6.go b/zonesettingipv6.go deleted file mode 100644 index e6d4d2fa47b..00000000000 --- a/zonesettingipv6.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingIPV6Service contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingIPV6Service] method -// instead. -type ZoneSettingIPV6Service struct { - Options []option.RequestOption -} - -// NewZoneSettingIPV6Service generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingIPV6Service(opts ...option.RequestOption) (r *ZoneSettingIPV6Service) { - r = &ZoneSettingIPV6Service{} - r.Options = opts - return -} - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -func (r *ZoneSettingIPV6Service) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingIPV6UpdateParams, opts ...option.RequestOption) (res *ZoneSettingIPV6UpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ipv6", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -func (r *ZoneSettingIPV6Service) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingIPV6ListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ipv6", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingIPV6UpdateResponse struct { - Errors []ZoneSettingIPV6UpdateResponseError `json:"errors"` - Messages []ZoneSettingIPV6UpdateResponseMessage `json:"messages"` - // Enable IPv6 on all subdomains that are Cloudflare enabled. - // (https://support.cloudflare.com/hc/en-us/articles/200168586). - Result ZoneSettingIPV6UpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingIPV6UpdateResponseJSON `json:"-"` -} - -// zoneSettingIPV6UpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6UpdateResponse] -type zoneSettingIPV6UpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6UpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPV6UpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPV6UpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingIPV6UpdateResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6UpdateResponseError] -type zoneSettingIPV6UpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6UpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPV6UpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPV6UpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingIPV6UpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingIPV6UpdateResponseMessage] -type zoneSettingIPV6UpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6UpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -type ZoneSettingIPV6UpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingIPV6UpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingIPV6UpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingIPV6UpdateResponseResultValue `json:"value"` - JSON zoneSettingIPV6UpdateResponseResultJSON `json:"-"` -} - -// zoneSettingIPV6UpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingIPV6UpdateResponseResult] -type zoneSettingIPV6UpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6UpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingIPV6UpdateResponseResultID string - -const ( - ZoneSettingIPV6UpdateResponseResultIDIPV6 ZoneSettingIPV6UpdateResponseResultID = "ipv6" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingIPV6UpdateResponseResultEditable bool - -const ( - ZoneSettingIPV6UpdateResponseResultEditableTrue ZoneSettingIPV6UpdateResponseResultEditable = true - ZoneSettingIPV6UpdateResponseResultEditableFalse ZoneSettingIPV6UpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingIPV6UpdateResponseResultValue string - -const ( - ZoneSettingIPV6UpdateResponseResultValueOff ZoneSettingIPV6UpdateResponseResultValue = "off" - ZoneSettingIPV6UpdateResponseResultValueOn ZoneSettingIPV6UpdateResponseResultValue = "on" -) - -type ZoneSettingIPV6ListResponse struct { - Errors []ZoneSettingIPV6ListResponseError `json:"errors"` - Messages []ZoneSettingIPV6ListResponseMessage `json:"messages"` - // Enable IPv6 on all subdomains that are Cloudflare enabled. - // (https://support.cloudflare.com/hc/en-us/articles/200168586). - Result ZoneSettingIPV6ListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingIPV6ListResponseJSON `json:"-"` -} - -// zoneSettingIPV6ListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6ListResponse] -type zoneSettingIPV6ListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6ListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPV6ListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPV6ListResponseErrorJSON `json:"-"` -} - -// zoneSettingIPV6ListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6ListResponseError] -type zoneSettingIPV6ListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6ListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingIPV6ListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingIPV6ListResponseMessageJSON `json:"-"` -} - -// zoneSettingIPV6ListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6ListResponseMessage] -type zoneSettingIPV6ListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6ListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable IPv6 on all subdomains that are Cloudflare enabled. -// (https://support.cloudflare.com/hc/en-us/articles/200168586). -type ZoneSettingIPV6ListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingIPV6ListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingIPV6ListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingIPV6ListResponseResultValue `json:"value"` - JSON zoneSettingIPV6ListResponseResultJSON `json:"-"` -} - -// zoneSettingIPV6ListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingIPV6ListResponseResult] -type zoneSettingIPV6ListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingIPV6ListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingIPV6ListResponseResultID string - -const ( - ZoneSettingIPV6ListResponseResultIDIPV6 ZoneSettingIPV6ListResponseResultID = "ipv6" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingIPV6ListResponseResultEditable bool - -const ( - ZoneSettingIPV6ListResponseResultEditableTrue ZoneSettingIPV6ListResponseResultEditable = true - ZoneSettingIPV6ListResponseResultEditableFalse ZoneSettingIPV6ListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingIPV6ListResponseResultValue string - -const ( - ZoneSettingIPV6ListResponseResultValueOff ZoneSettingIPV6ListResponseResultValue = "off" - ZoneSettingIPV6ListResponseResultValueOn ZoneSettingIPV6ListResponseResultValue = "on" -) - -type ZoneSettingIPV6UpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingIPV6UpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingIPV6UpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingIPV6UpdateParamsValue string - -const ( - ZoneSettingIPV6UpdateParamsValueOff ZoneSettingIPV6UpdateParamsValue = "off" - ZoneSettingIPV6UpdateParamsValueOn ZoneSettingIPV6UpdateParamsValue = "on" -) diff --git a/zonesettingipv6_test.go b/zonesettingipv6_test.go deleted file mode 100644 index 8a69e628d74..00000000000 --- a/zonesettingipv6_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingIPV6Update(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.IPV6s.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingIPV6UpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingIPV6UpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingIPV6List(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.IPV6s.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingminify.go b/zonesettingminify.go deleted file mode 100644 index e666ff02bab..00000000000 --- a/zonesettingminify.go +++ /dev/null @@ -1,422 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingMinifyService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingMinifyService] method -// instead. -type ZoneSettingMinifyService struct { - Options []option.RequestOption -} - -// NewZoneSettingMinifyService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingMinifyService(opts ...option.RequestOption) (r *ZoneSettingMinifyService) { - r = &ZoneSettingMinifyService{} - r.Options = opts - return -} - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -func (r *ZoneSettingMinifyService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingMinifyUpdateParams, opts ...option.RequestOption) (res *ZoneSettingMinifyUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/minify", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -func (r *ZoneSettingMinifyService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingMinifyListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/minify", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingMinifyUpdateResponse struct { - Errors []ZoneSettingMinifyUpdateResponseError `json:"errors"` - Messages []ZoneSettingMinifyUpdateResponseMessage `json:"messages"` - // Automatically minify certain assets for your website. Refer to - // [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - // for more information. - Result ZoneSettingMinifyUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMinifyUpdateResponseJSON `json:"-"` -} - -// zoneSettingMinifyUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingMinifyUpdateResponse] -type zoneSettingMinifyUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinifyUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinifyUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingMinifyUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyUpdateResponseError] -type zoneSettingMinifyUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinifyUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinifyUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingMinifyUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyUpdateResponseMessage] -type zoneSettingMinifyUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -type ZoneSettingMinifyUpdateResponseResult struct { - // Zone setting identifier. - ID ZoneSettingMinifyUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMinifyUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMinifyUpdateResponseResultValue `json:"value"` - JSON zoneSettingMinifyUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingMinifyUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyUpdateResponseResult] -type zoneSettingMinifyUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Zone setting identifier. -type ZoneSettingMinifyUpdateResponseResultID string - -const ( - ZoneSettingMinifyUpdateResponseResultIDMinify ZoneSettingMinifyUpdateResponseResultID = "minify" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMinifyUpdateResponseResultEditable bool - -const ( - ZoneSettingMinifyUpdateResponseResultEditableTrue ZoneSettingMinifyUpdateResponseResultEditable = true - ZoneSettingMinifyUpdateResponseResultEditableFalse ZoneSettingMinifyUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMinifyUpdateResponseResultValue struct { - // Automatically minify all CSS files for your website. - Css ZoneSettingMinifyUpdateResponseResultValueCss `json:"css"` - // Automatically minify all HTML files for your website. - HTML ZoneSettingMinifyUpdateResponseResultValueHTML `json:"html"` - // Automatically minify all JavaScript files for your website. - Js ZoneSettingMinifyUpdateResponseResultValueJs `json:"js"` - JSON zoneSettingMinifyUpdateResponseResultValueJSON `json:"-"` -} - -// zoneSettingMinifyUpdateResponseResultValueJSON contains the JSON metadata for -// the struct [ZoneSettingMinifyUpdateResponseResultValue] -type zoneSettingMinifyUpdateResponseResultValueJSON struct { - Css apijson.Field - HTML apijson.Field - Js apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyUpdateResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingMinifyUpdateResponseResultValueCss string - -const ( - ZoneSettingMinifyUpdateResponseResultValueCssOn ZoneSettingMinifyUpdateResponseResultValueCss = "on" - ZoneSettingMinifyUpdateResponseResultValueCssOff ZoneSettingMinifyUpdateResponseResultValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingMinifyUpdateResponseResultValueHTML string - -const ( - ZoneSettingMinifyUpdateResponseResultValueHTMLOn ZoneSettingMinifyUpdateResponseResultValueHTML = "on" - ZoneSettingMinifyUpdateResponseResultValueHTMLOff ZoneSettingMinifyUpdateResponseResultValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingMinifyUpdateResponseResultValueJs string - -const ( - ZoneSettingMinifyUpdateResponseResultValueJsOn ZoneSettingMinifyUpdateResponseResultValueJs = "on" - ZoneSettingMinifyUpdateResponseResultValueJsOff ZoneSettingMinifyUpdateResponseResultValueJs = "off" -) - -type ZoneSettingMinifyListResponse struct { - Errors []ZoneSettingMinifyListResponseError `json:"errors"` - Messages []ZoneSettingMinifyListResponseMessage `json:"messages"` - // Automatically minify certain assets for your website. Refer to - // [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) - // for more information. - Result ZoneSettingMinifyListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMinifyListResponseJSON `json:"-"` -} - -// zoneSettingMinifyListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingMinifyListResponse] -type zoneSettingMinifyListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinifyListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinifyListResponseErrorJSON `json:"-"` -} - -// zoneSettingMinifyListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingMinifyListResponseError] -type zoneSettingMinifyListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinifyListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinifyListResponseMessageJSON `json:"-"` -} - -// zoneSettingMinifyListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyListResponseMessage] -type zoneSettingMinifyListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify certain assets for your website. Refer to -// [Using Cloudflare Auto Minify](https://support.cloudflare.com/hc/en-us/articles/200168196) -// for more information. -type ZoneSettingMinifyListResponseResult struct { - // Zone setting identifier. - ID ZoneSettingMinifyListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMinifyListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMinifyListResponseResultValue `json:"value"` - JSON zoneSettingMinifyListResponseResultJSON `json:"-"` -} - -// zoneSettingMinifyListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyListResponseResult] -type zoneSettingMinifyListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Zone setting identifier. -type ZoneSettingMinifyListResponseResultID string - -const ( - ZoneSettingMinifyListResponseResultIDMinify ZoneSettingMinifyListResponseResultID = "minify" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMinifyListResponseResultEditable bool - -const ( - ZoneSettingMinifyListResponseResultEditableTrue ZoneSettingMinifyListResponseResultEditable = true - ZoneSettingMinifyListResponseResultEditableFalse ZoneSettingMinifyListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMinifyListResponseResultValue struct { - // Automatically minify all CSS files for your website. - Css ZoneSettingMinifyListResponseResultValueCss `json:"css"` - // Automatically minify all HTML files for your website. - HTML ZoneSettingMinifyListResponseResultValueHTML `json:"html"` - // Automatically minify all JavaScript files for your website. - Js ZoneSettingMinifyListResponseResultValueJs `json:"js"` - JSON zoneSettingMinifyListResponseResultValueJSON `json:"-"` -} - -// zoneSettingMinifyListResponseResultValueJSON contains the JSON metadata for the -// struct [ZoneSettingMinifyListResponseResultValue] -type zoneSettingMinifyListResponseResultValueJSON struct { - Css apijson.Field - HTML apijson.Field - Js apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinifyListResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingMinifyListResponseResultValueCss string - -const ( - ZoneSettingMinifyListResponseResultValueCssOn ZoneSettingMinifyListResponseResultValueCss = "on" - ZoneSettingMinifyListResponseResultValueCssOff ZoneSettingMinifyListResponseResultValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingMinifyListResponseResultValueHTML string - -const ( - ZoneSettingMinifyListResponseResultValueHTMLOn ZoneSettingMinifyListResponseResultValueHTML = "on" - ZoneSettingMinifyListResponseResultValueHTMLOff ZoneSettingMinifyListResponseResultValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingMinifyListResponseResultValueJs string - -const ( - ZoneSettingMinifyListResponseResultValueJsOn ZoneSettingMinifyListResponseResultValueJs = "on" - ZoneSettingMinifyListResponseResultValueJsOff ZoneSettingMinifyListResponseResultValueJs = "off" -) - -type ZoneSettingMinifyUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingMinifyUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingMinifyUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingMinifyUpdateParamsValue struct { - // Automatically minify all CSS files for your website. - Css param.Field[ZoneSettingMinifyUpdateParamsValueCss] `json:"css"` - // Automatically minify all HTML files for your website. - HTML param.Field[ZoneSettingMinifyUpdateParamsValueHTML] `json:"html"` - // Automatically minify all JavaScript files for your website. - Js param.Field[ZoneSettingMinifyUpdateParamsValueJs] `json:"js"` -} - -func (r ZoneSettingMinifyUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Automatically minify all CSS files for your website. -type ZoneSettingMinifyUpdateParamsValueCss string - -const ( - ZoneSettingMinifyUpdateParamsValueCssOn ZoneSettingMinifyUpdateParamsValueCss = "on" - ZoneSettingMinifyUpdateParamsValueCssOff ZoneSettingMinifyUpdateParamsValueCss = "off" -) - -// Automatically minify all HTML files for your website. -type ZoneSettingMinifyUpdateParamsValueHTML string - -const ( - ZoneSettingMinifyUpdateParamsValueHTMLOn ZoneSettingMinifyUpdateParamsValueHTML = "on" - ZoneSettingMinifyUpdateParamsValueHTMLOff ZoneSettingMinifyUpdateParamsValueHTML = "off" -) - -// Automatically minify all JavaScript files for your website. -type ZoneSettingMinifyUpdateParamsValueJs string - -const ( - ZoneSettingMinifyUpdateParamsValueJsOn ZoneSettingMinifyUpdateParamsValueJs = "on" - ZoneSettingMinifyUpdateParamsValueJsOff ZoneSettingMinifyUpdateParamsValueJs = "off" -) diff --git a/zonesettingminify_test.go b/zonesettingminify_test.go deleted file mode 100644 index 309144d8951..00000000000 --- a/zonesettingminify_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingMinifyUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Minifies.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingMinifyUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingMinifyUpdateParamsValue{ - Css: cloudflare.F(cloudflare.ZoneSettingMinifyUpdateParamsValueCssOn), - HTML: cloudflare.F(cloudflare.ZoneSettingMinifyUpdateParamsValueHTMLOn), - Js: cloudflare.F(cloudflare.ZoneSettingMinifyUpdateParamsValueJsOn), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingMinifyList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Minifies.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingmintlsversion.go b/zonesettingmintlsversion.go deleted file mode 100644 index 8d3a968463c..00000000000 --- a/zonesettingmintlsversion.go +++ /dev/null @@ -1,312 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingMinTLSVersionService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingMinTLSVersionService] method instead. -type ZoneSettingMinTLSVersionService struct { - Options []option.RequestOption -} - -// NewZoneSettingMinTLSVersionService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingMinTLSVersionService(opts ...option.RequestOption) (r *ZoneSettingMinTLSVersionService) { - r = &ZoneSettingMinTLSVersionService{} - r.Options = opts - return -} - -// Changes Minimum TLS Version setting. -func (r *ZoneSettingMinTLSVersionService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingMinTLSVersionUpdateParams, opts ...option.RequestOption) (res *ZoneSettingMinTLSVersionUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/min_tls_version", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets Minimum TLS Version setting. -func (r *ZoneSettingMinTLSVersionService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingMinTLSVersionListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/min_tls_version", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingMinTLSVersionUpdateResponse struct { - Errors []ZoneSettingMinTLSVersionUpdateResponseError `json:"errors"` - Messages []ZoneSettingMinTLSVersionUpdateResponseMessage `json:"messages"` - // Only accepts HTTPS requests that use at least the TLS protocol version - // specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be - // rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. - Result ZoneSettingMinTLSVersionUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMinTLSVersionUpdateResponseJSON `json:"-"` -} - -// zoneSettingMinTLSVersionUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingMinTLSVersionUpdateResponse] -type zoneSettingMinTLSVersionUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinTLSVersionUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinTLSVersionUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingMinTLSVersionUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingMinTLSVersionUpdateResponseError] -type zoneSettingMinTLSVersionUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinTLSVersionUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinTLSVersionUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingMinTLSVersionUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingMinTLSVersionUpdateResponseMessage] -type zoneSettingMinTLSVersionUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Only accepts HTTPS requests that use at least the TLS protocol version -// specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be -// rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. -type ZoneSettingMinTLSVersionUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingMinTLSVersionUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMinTLSVersionUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMinTLSVersionUpdateResponseResultValue `json:"value"` - JSON zoneSettingMinTLSVersionUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingMinTLSVersionUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingMinTLSVersionUpdateResponseResult] -type zoneSettingMinTLSVersionUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingMinTLSVersionUpdateResponseResultID string - -const ( - ZoneSettingMinTLSVersionUpdateResponseResultIDMinTLSVersion ZoneSettingMinTLSVersionUpdateResponseResultID = "min_tls_version" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMinTLSVersionUpdateResponseResultEditable bool - -const ( - ZoneSettingMinTLSVersionUpdateResponseResultEditableTrue ZoneSettingMinTLSVersionUpdateResponseResultEditable = true - ZoneSettingMinTLSVersionUpdateResponseResultEditableFalse ZoneSettingMinTLSVersionUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMinTLSVersionUpdateResponseResultValue string - -const ( - ZoneSettingMinTLSVersionUpdateResponseResultValue1_0 ZoneSettingMinTLSVersionUpdateResponseResultValue = "1.0" - ZoneSettingMinTLSVersionUpdateResponseResultValue1_1 ZoneSettingMinTLSVersionUpdateResponseResultValue = "1.1" - ZoneSettingMinTLSVersionUpdateResponseResultValue1_2 ZoneSettingMinTLSVersionUpdateResponseResultValue = "1.2" - ZoneSettingMinTLSVersionUpdateResponseResultValue1_3 ZoneSettingMinTLSVersionUpdateResponseResultValue = "1.3" -) - -type ZoneSettingMinTLSVersionListResponse struct { - Errors []ZoneSettingMinTLSVersionListResponseError `json:"errors"` - Messages []ZoneSettingMinTLSVersionListResponseMessage `json:"messages"` - // Only accepts HTTPS requests that use at least the TLS protocol version - // specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be - // rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. - Result ZoneSettingMinTLSVersionListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMinTLSVersionListResponseJSON `json:"-"` -} - -// zoneSettingMinTLSVersionListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingMinTLSVersionListResponse] -type zoneSettingMinTLSVersionListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinTLSVersionListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinTLSVersionListResponseErrorJSON `json:"-"` -} - -// zoneSettingMinTLSVersionListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingMinTLSVersionListResponseError] -type zoneSettingMinTLSVersionListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMinTLSVersionListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMinTLSVersionListResponseMessageJSON `json:"-"` -} - -// zoneSettingMinTLSVersionListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingMinTLSVersionListResponseMessage] -type zoneSettingMinTLSVersionListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Only accepts HTTPS requests that use at least the TLS protocol version -// specified. For example, if TLS 1.1 is selected, TLS 1.0 connections will be -// rejected, while 1.1, 1.2, and 1.3 (if enabled) will be permitted. -type ZoneSettingMinTLSVersionListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingMinTLSVersionListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMinTLSVersionListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMinTLSVersionListResponseResultValue `json:"value"` - JSON zoneSettingMinTLSVersionListResponseResultJSON `json:"-"` -} - -// zoneSettingMinTLSVersionListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingMinTLSVersionListResponseResult] -type zoneSettingMinTLSVersionListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMinTLSVersionListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingMinTLSVersionListResponseResultID string - -const ( - ZoneSettingMinTLSVersionListResponseResultIDMinTLSVersion ZoneSettingMinTLSVersionListResponseResultID = "min_tls_version" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMinTLSVersionListResponseResultEditable bool - -const ( - ZoneSettingMinTLSVersionListResponseResultEditableTrue ZoneSettingMinTLSVersionListResponseResultEditable = true - ZoneSettingMinTLSVersionListResponseResultEditableFalse ZoneSettingMinTLSVersionListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMinTLSVersionListResponseResultValue string - -const ( - ZoneSettingMinTLSVersionListResponseResultValue1_0 ZoneSettingMinTLSVersionListResponseResultValue = "1.0" - ZoneSettingMinTLSVersionListResponseResultValue1_1 ZoneSettingMinTLSVersionListResponseResultValue = "1.1" - ZoneSettingMinTLSVersionListResponseResultValue1_2 ZoneSettingMinTLSVersionListResponseResultValue = "1.2" - ZoneSettingMinTLSVersionListResponseResultValue1_3 ZoneSettingMinTLSVersionListResponseResultValue = "1.3" -) - -type ZoneSettingMinTLSVersionUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingMinTLSVersionUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingMinTLSVersionUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingMinTLSVersionUpdateParamsValue string - -const ( - ZoneSettingMinTLSVersionUpdateParamsValue1_0 ZoneSettingMinTLSVersionUpdateParamsValue = "1.0" - ZoneSettingMinTLSVersionUpdateParamsValue1_1 ZoneSettingMinTLSVersionUpdateParamsValue = "1.1" - ZoneSettingMinTLSVersionUpdateParamsValue1_2 ZoneSettingMinTLSVersionUpdateParamsValue = "1.2" - ZoneSettingMinTLSVersionUpdateParamsValue1_3 ZoneSettingMinTLSVersionUpdateParamsValue = "1.3" -) diff --git a/zonesettingmintlsversion_test.go b/zonesettingmintlsversion_test.go deleted file mode 100644 index cbbc0345d36..00000000000 --- a/zonesettingmintlsversion_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingMinTLSVersionUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.MinTLSVersions.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingMinTLSVersionUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingMinTLSVersionUpdateParamsValue1_0), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingMinTLSVersionList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.MinTLSVersions.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingmirage.go b/zonesettingmirage.go deleted file mode 100644 index 30bad74e9c2..00000000000 --- a/zonesettingmirage.go +++ /dev/null @@ -1,316 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingMirageService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingMirageService] method -// instead. -type ZoneSettingMirageService struct { - Options []option.RequestOption -} - -// NewZoneSettingMirageService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingMirageService(opts ...option.RequestOption) (r *ZoneSettingMirageService) { - r = &ZoneSettingMirageService{} - r.Options = opts - return -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to our -// [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more -// information. -func (r *ZoneSettingMirageService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingMirageUpdateParams, opts ...option.RequestOption) (res *ZoneSettingMirageUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/mirage", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to our -// [blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for more -// information. -func (r *ZoneSettingMirageService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingMirageListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/mirage", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingMirageUpdateResponse struct { - Errors []ZoneSettingMirageUpdateResponseError `json:"errors"` - Messages []ZoneSettingMirageUpdateResponseMessage `json:"messages"` - // Automatically optimize image loading for website visitors on mobile devices. - // Refer to - // [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for - // more information. - Result ZoneSettingMirageUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMirageUpdateResponseJSON `json:"-"` -} - -// zoneSettingMirageUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingMirageUpdateResponse] -type zoneSettingMirageUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMirageUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMirageUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingMirageUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingMirageUpdateResponseError] -type zoneSettingMirageUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMirageUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMirageUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingMirageUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingMirageUpdateResponseMessage] -type zoneSettingMirageUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to -// [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for -// more information. -type ZoneSettingMirageUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingMirageUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMirageUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMirageUpdateResponseResultValue `json:"value"` - JSON zoneSettingMirageUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingMirageUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingMirageUpdateResponseResult] -type zoneSettingMirageUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingMirageUpdateResponseResultID string - -const ( - ZoneSettingMirageUpdateResponseResultIDMirage ZoneSettingMirageUpdateResponseResultID = "mirage" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMirageUpdateResponseResultEditable bool - -const ( - ZoneSettingMirageUpdateResponseResultEditableTrue ZoneSettingMirageUpdateResponseResultEditable = true - ZoneSettingMirageUpdateResponseResultEditableFalse ZoneSettingMirageUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMirageUpdateResponseResultValue string - -const ( - ZoneSettingMirageUpdateResponseResultValueOn ZoneSettingMirageUpdateResponseResultValue = "on" - ZoneSettingMirageUpdateResponseResultValueOff ZoneSettingMirageUpdateResponseResultValue = "off" -) - -type ZoneSettingMirageListResponse struct { - Errors []ZoneSettingMirageListResponseError `json:"errors"` - Messages []ZoneSettingMirageListResponseMessage `json:"messages"` - // Automatically optimize image loading for website visitors on mobile devices. - // Refer to - // [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for - // more information. - Result ZoneSettingMirageListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMirageListResponseJSON `json:"-"` -} - -// zoneSettingMirageListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingMirageListResponse] -type zoneSettingMirageListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMirageListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMirageListResponseErrorJSON `json:"-"` -} - -// zoneSettingMirageListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingMirageListResponseError] -type zoneSettingMirageListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMirageListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMirageListResponseMessageJSON `json:"-"` -} - -// zoneSettingMirageListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingMirageListResponseMessage] -type zoneSettingMirageListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to -// [our blog post](http://blog.cloudflare.com/mirage2-solving-mobile-speed) for -// more information. -type ZoneSettingMirageListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingMirageListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMirageListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMirageListResponseResultValue `json:"value"` - JSON zoneSettingMirageListResponseResultJSON `json:"-"` -} - -// zoneSettingMirageListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingMirageListResponseResult] -type zoneSettingMirageListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMirageListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingMirageListResponseResultID string - -const ( - ZoneSettingMirageListResponseResultIDMirage ZoneSettingMirageListResponseResultID = "mirage" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMirageListResponseResultEditable bool - -const ( - ZoneSettingMirageListResponseResultEditableTrue ZoneSettingMirageListResponseResultEditable = true - ZoneSettingMirageListResponseResultEditableFalse ZoneSettingMirageListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMirageListResponseResultValue string - -const ( - ZoneSettingMirageListResponseResultValueOn ZoneSettingMirageListResponseResultValue = "on" - ZoneSettingMirageListResponseResultValueOff ZoneSettingMirageListResponseResultValue = "off" -) - -type ZoneSettingMirageUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingMirageUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingMirageUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingMirageUpdateParamsValue string - -const ( - ZoneSettingMirageUpdateParamsValueOn ZoneSettingMirageUpdateParamsValue = "on" - ZoneSettingMirageUpdateParamsValueOff ZoneSettingMirageUpdateParamsValue = "off" -) diff --git a/zonesettingmirage_test.go b/zonesettingmirage_test.go deleted file mode 100644 index 02fee2f8a04..00000000000 --- a/zonesettingmirage_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingMirageUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Mirages.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingMirageUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingMirageUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingMirageList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Mirages.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingmobileredirect.go b/zonesettingmobileredirect.go deleted file mode 100644 index fa6be34dca2..00000000000 --- a/zonesettingmobileredirect.go +++ /dev/null @@ -1,386 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingMobileRedirectService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingMobileRedirectService] method instead. -type ZoneSettingMobileRedirectService struct { - Options []option.RequestOption -} - -// NewZoneSettingMobileRedirectService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingMobileRedirectService(opts ...option.RequestOption) (r *ZoneSettingMobileRedirectService) { - r = &ZoneSettingMobileRedirectService{} - r.Options = opts - return -} - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -func (r *ZoneSettingMobileRedirectService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingMobileRedirectUpdateParams, opts ...option.RequestOption) (res *ZoneSettingMobileRedirectUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/mobile_redirect", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -func (r *ZoneSettingMobileRedirectService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingMobileRedirectListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/mobile_redirect", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingMobileRedirectUpdateResponse struct { - Errors []ZoneSettingMobileRedirectUpdateResponseError `json:"errors"` - Messages []ZoneSettingMobileRedirectUpdateResponseMessage `json:"messages"` - // Automatically redirect visitors on mobile devices to a mobile-optimized - // subdomain. Refer to - // [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - // for more information. - Result ZoneSettingMobileRedirectUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMobileRedirectUpdateResponseJSON `json:"-"` -} - -// zoneSettingMobileRedirectUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingMobileRedirectUpdateResponse] -type zoneSettingMobileRedirectUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMobileRedirectUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMobileRedirectUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingMobileRedirectUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingMobileRedirectUpdateResponseError] -type zoneSettingMobileRedirectUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMobileRedirectUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMobileRedirectUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingMobileRedirectUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingMobileRedirectUpdateResponseMessage] -type zoneSettingMobileRedirectUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -type ZoneSettingMobileRedirectUpdateResponseResult struct { - // Identifier of the zone setting. - ID ZoneSettingMobileRedirectUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMobileRedirectUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMobileRedirectUpdateResponseResultValue `json:"value"` - JSON zoneSettingMobileRedirectUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingMobileRedirectUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingMobileRedirectUpdateResponseResult] -type zoneSettingMobileRedirectUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Identifier of the zone setting. -type ZoneSettingMobileRedirectUpdateResponseResultID string - -const ( - ZoneSettingMobileRedirectUpdateResponseResultIDMobileRedirect ZoneSettingMobileRedirectUpdateResponseResultID = "mobile_redirect" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMobileRedirectUpdateResponseResultEditable bool - -const ( - ZoneSettingMobileRedirectUpdateResponseResultEditableTrue ZoneSettingMobileRedirectUpdateResponseResultEditable = true - ZoneSettingMobileRedirectUpdateResponseResultEditableFalse ZoneSettingMobileRedirectUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMobileRedirectUpdateResponseResultValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain string `json:"mobile_subdomain,nullable"` - // Whether or not mobile redirect is enabled. - Status ZoneSettingMobileRedirectUpdateResponseResultValueStatus `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri bool `json:"strip_uri"` - JSON zoneSettingMobileRedirectUpdateResponseResultValueJSON `json:"-"` -} - -// zoneSettingMobileRedirectUpdateResponseResultValueJSON contains the JSON -// metadata for the struct [ZoneSettingMobileRedirectUpdateResponseResultValue] -type zoneSettingMobileRedirectUpdateResponseResultValueJSON struct { - MobileSubdomain apijson.Field - Status apijson.Field - StripUri apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectUpdateResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingMobileRedirectUpdateResponseResultValueStatus string - -const ( - ZoneSettingMobileRedirectUpdateResponseResultValueStatusOn ZoneSettingMobileRedirectUpdateResponseResultValueStatus = "on" - ZoneSettingMobileRedirectUpdateResponseResultValueStatusOff ZoneSettingMobileRedirectUpdateResponseResultValueStatus = "off" -) - -type ZoneSettingMobileRedirectListResponse struct { - Errors []ZoneSettingMobileRedirectListResponseError `json:"errors"` - Messages []ZoneSettingMobileRedirectListResponseMessage `json:"messages"` - // Automatically redirect visitors on mobile devices to a mobile-optimized - // subdomain. Refer to - // [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) - // for more information. - Result ZoneSettingMobileRedirectListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingMobileRedirectListResponseJSON `json:"-"` -} - -// zoneSettingMobileRedirectListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingMobileRedirectListResponse] -type zoneSettingMobileRedirectListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMobileRedirectListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMobileRedirectListResponseErrorJSON `json:"-"` -} - -// zoneSettingMobileRedirectListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingMobileRedirectListResponseError] -type zoneSettingMobileRedirectListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingMobileRedirectListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingMobileRedirectListResponseMessageJSON `json:"-"` -} - -// zoneSettingMobileRedirectListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingMobileRedirectListResponseMessage] -type zoneSettingMobileRedirectListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Automatically redirect visitors on mobile devices to a mobile-optimized -// subdomain. Refer to -// [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) -// for more information. -type ZoneSettingMobileRedirectListResponseResult struct { - // Identifier of the zone setting. - ID ZoneSettingMobileRedirectListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingMobileRedirectListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingMobileRedirectListResponseResultValue `json:"value"` - JSON zoneSettingMobileRedirectListResponseResultJSON `json:"-"` -} - -// zoneSettingMobileRedirectListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingMobileRedirectListResponseResult] -type zoneSettingMobileRedirectListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Identifier of the zone setting. -type ZoneSettingMobileRedirectListResponseResultID string - -const ( - ZoneSettingMobileRedirectListResponseResultIDMobileRedirect ZoneSettingMobileRedirectListResponseResultID = "mobile_redirect" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingMobileRedirectListResponseResultEditable bool - -const ( - ZoneSettingMobileRedirectListResponseResultEditableTrue ZoneSettingMobileRedirectListResponseResultEditable = true - ZoneSettingMobileRedirectListResponseResultEditableFalse ZoneSettingMobileRedirectListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingMobileRedirectListResponseResultValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain string `json:"mobile_subdomain,nullable"` - // Whether or not mobile redirect is enabled. - Status ZoneSettingMobileRedirectListResponseResultValueStatus `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri bool `json:"strip_uri"` - JSON zoneSettingMobileRedirectListResponseResultValueJSON `json:"-"` -} - -// zoneSettingMobileRedirectListResponseResultValueJSON contains the JSON metadata -// for the struct [ZoneSettingMobileRedirectListResponseResultValue] -type zoneSettingMobileRedirectListResponseResultValueJSON struct { - MobileSubdomain apijson.Field - Status apijson.Field - StripUri apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingMobileRedirectListResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingMobileRedirectListResponseResultValueStatus string - -const ( - ZoneSettingMobileRedirectListResponseResultValueStatusOn ZoneSettingMobileRedirectListResponseResultValueStatus = "on" - ZoneSettingMobileRedirectListResponseResultValueStatusOff ZoneSettingMobileRedirectListResponseResultValueStatus = "off" -) - -type ZoneSettingMobileRedirectUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingMobileRedirectUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingMobileRedirectUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingMobileRedirectUpdateParamsValue struct { - // Which subdomain prefix you wish to redirect visitors on mobile devices to - // (subdomain must already exist). - MobileSubdomain param.Field[string] `json:"mobile_subdomain"` - // Whether or not mobile redirect is enabled. - Status param.Field[ZoneSettingMobileRedirectUpdateParamsValueStatus] `json:"status"` - // Whether to drop the current page path and redirect to the mobile subdomain URL - // root, or keep the path and redirect to the same page on the mobile subdomain. - StripUri param.Field[bool] `json:"strip_uri"` -} - -func (r ZoneSettingMobileRedirectUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Whether or not mobile redirect is enabled. -type ZoneSettingMobileRedirectUpdateParamsValueStatus string - -const ( - ZoneSettingMobileRedirectUpdateParamsValueStatusOn ZoneSettingMobileRedirectUpdateParamsValueStatus = "on" - ZoneSettingMobileRedirectUpdateParamsValueStatusOff ZoneSettingMobileRedirectUpdateParamsValueStatus = "off" -) diff --git a/zonesettingmobileredirect_test.go b/zonesettingmobileredirect_test.go deleted file mode 100644 index 861ac8ff742..00000000000 --- a/zonesettingmobileredirect_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingMobileRedirectUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.MobileRedirects.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingMobileRedirectUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingMobileRedirectUpdateParamsValue{ - MobileSubdomain: cloudflare.F("m"), - Status: cloudflare.F(cloudflare.ZoneSettingMobileRedirectUpdateParamsValueStatusOn), - StripUri: cloudflare.F(false), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingMobileRedirectList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.MobileRedirects.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingnel.go b/zonesettingnel.go deleted file mode 100644 index 1b4cf16a5c5..00000000000 --- a/zonesettingnel.go +++ /dev/null @@ -1,349 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingNELService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingNELService] method -// instead. -type ZoneSettingNELService struct { - Options []option.RequestOption -} - -// NewZoneSettingNELService generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingNELService(opts ...option.RequestOption) (r *ZoneSettingNELService) { - r = &ZoneSettingNELService{} - r.Options = opts - return -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed) -// for more information. -func (r *ZoneSettingNELService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingNELUpdateParams, opts ...option.RequestOption) (res *ZoneSettingNELUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/nel", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enable Network Error Logging reporting on your zone. (Beta) -func (r *ZoneSettingNELService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingNELListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/nel", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingNELUpdateResponse struct { - Errors []ZoneSettingNELUpdateResponseError `json:"errors"` - Messages []ZoneSettingNELUpdateResponseMessage `json:"messages"` - // Enable Network Error Logging reporting on your zone. (Beta) - Result ZoneSettingNELUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingNELUpdateResponseJSON `json:"-"` -} - -// zoneSettingNELUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingNELUpdateResponse] -type zoneSettingNELUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingNELUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingNELUpdateResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingNELUpdateResponseError] -type zoneSettingNELUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingNELUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingNELUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingNELUpdateResponseMessage] -type zoneSettingNELUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingNELUpdateResponseResult struct { - // Zone setting identifier. - ID ZoneSettingNELUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingNELUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingNELUpdateResponseResultValue `json:"value"` - JSON zoneSettingNELUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingNELUpdateResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingNELUpdateResponseResult] -type zoneSettingNELUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Zone setting identifier. -type ZoneSettingNELUpdateResponseResultID string - -const ( - ZoneSettingNELUpdateResponseResultIDNEL ZoneSettingNELUpdateResponseResultID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingNELUpdateResponseResultEditable bool - -const ( - ZoneSettingNELUpdateResponseResultEditableTrue ZoneSettingNELUpdateResponseResultEditable = true - ZoneSettingNELUpdateResponseResultEditableFalse ZoneSettingNELUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingNELUpdateResponseResultValue struct { - Enabled bool `json:"enabled"` - JSON zoneSettingNELUpdateResponseResultValueJSON `json:"-"` -} - -// zoneSettingNELUpdateResponseResultValueJSON contains the JSON metadata for the -// struct [ZoneSettingNELUpdateResponseResultValue] -type zoneSettingNELUpdateResponseResultValueJSON struct { - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELUpdateResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELListResponse struct { - Errors []ZoneSettingNELListResponseError `json:"errors"` - Messages []ZoneSettingNELListResponseMessage `json:"messages"` - // Enable Network Error Logging reporting on your zone. (Beta) - Result ZoneSettingNELListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingNELListResponseJSON `json:"-"` -} - -// zoneSettingNELListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingNELListResponse] -type zoneSettingNELListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingNELListResponseErrorJSON `json:"-"` -} - -// zoneSettingNELListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingNELListResponseError] -type zoneSettingNELListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingNELListResponseMessageJSON `json:"-"` -} - -// zoneSettingNELListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingNELListResponseMessage] -type zoneSettingNELListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingNELListResponseResult struct { - // Zone setting identifier. - ID ZoneSettingNELListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingNELListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingNELListResponseResultValue `json:"value"` - JSON zoneSettingNELListResponseResultJSON `json:"-"` -} - -// zoneSettingNELListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingNELListResponseResult] -type zoneSettingNELListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Zone setting identifier. -type ZoneSettingNELListResponseResultID string - -const ( - ZoneSettingNELListResponseResultIDNEL ZoneSettingNELListResponseResultID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingNELListResponseResultEditable bool - -const ( - ZoneSettingNELListResponseResultEditableTrue ZoneSettingNELListResponseResultEditable = true - ZoneSettingNELListResponseResultEditableFalse ZoneSettingNELListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingNELListResponseResultValue struct { - Enabled bool `json:"enabled"` - JSON zoneSettingNELListResponseResultValueJSON `json:"-"` -} - -// zoneSettingNELListResponseResultValueJSON contains the JSON metadata for the -// struct [ZoneSettingNELListResponseResultValue] -type zoneSettingNELListResponseResultValueJSON struct { - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingNELListResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingNELUpdateParams struct { - // Enable Network Error Logging reporting on your zone. (Beta) - Value param.Field[ZoneSettingNELUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingNELUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Enable Network Error Logging reporting on your zone. (Beta) -type ZoneSettingNELUpdateParamsValue struct { - // Zone setting identifier. - ID param.Field[ZoneSettingNELUpdateParamsValueID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingNELUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingNELUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Zone setting identifier. -type ZoneSettingNELUpdateParamsValueID string - -const ( - ZoneSettingNELUpdateParamsValueIDNEL ZoneSettingNELUpdateParamsValueID = "nel" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingNELUpdateParamsValueEditable bool - -const ( - ZoneSettingNELUpdateParamsValueEditableTrue ZoneSettingNELUpdateParamsValueEditable = true - ZoneSettingNELUpdateParamsValueEditableFalse ZoneSettingNELUpdateParamsValueEditable = false -) - -// Value of the zone setting. -type ZoneSettingNELUpdateParamsValueValue struct { - Enabled param.Field[bool] `json:"enabled"` -} - -func (r ZoneSettingNELUpdateParamsValueValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} diff --git a/zonesettingnel_test.go b/zonesettingnel_test.go deleted file mode 100644 index 0acfa0cd051..00000000000 --- a/zonesettingnel_test.go +++ /dev/null @@ -1,73 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingNELUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.NELs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingNELUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingNELUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingNELUpdateParamsValueIDNEL), - Value: cloudflare.F(cloudflare.ZoneSettingNELUpdateParamsValueValue{ - Enabled: cloudflare.F(false), - }), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingNELList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.NELs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingopportunisticencryption.go b/zonesettingopportunisticencryption.go deleted file mode 100644 index 939e5ecbc27..00000000000 --- a/zonesettingopportunisticencryption.go +++ /dev/null @@ -1,306 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingOpportunisticEncryptionService contains methods and other services -// that help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingOpportunisticEncryptionService] method instead. -type ZoneSettingOpportunisticEncryptionService struct { - Options []option.RequestOption -} - -// NewZoneSettingOpportunisticEncryptionService generates a new service that -// applies the given options to each request. These options are applied after the -// parent client's options (if there is one), and before any request-specific -// options. -func NewZoneSettingOpportunisticEncryptionService(opts ...option.RequestOption) (r *ZoneSettingOpportunisticEncryptionService) { - r = &ZoneSettingOpportunisticEncryptionService{} - r.Options = opts - return -} - -// Changes Opportunistic Encryption setting. -func (r *ZoneSettingOpportunisticEncryptionService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingOpportunisticEncryptionUpdateParams, opts ...option.RequestOption) (res *ZoneSettingOpportunisticEncryptionUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/opportunistic_encryption", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets Opportunistic Encryption setting. -func (r *ZoneSettingOpportunisticEncryptionService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingOpportunisticEncryptionListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/opportunistic_encryption", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingOpportunisticEncryptionUpdateResponse struct { - Errors []ZoneSettingOpportunisticEncryptionUpdateResponseError `json:"errors"` - Messages []ZoneSettingOpportunisticEncryptionUpdateResponseMessage `json:"messages"` - // Enables the Opportunistic Encryption feature for a zone. - Result ZoneSettingOpportunisticEncryptionUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOpportunisticEncryptionUpdateResponseJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionUpdateResponseJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticEncryptionUpdateResponse] -type zoneSettingOpportunisticEncryptionUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticEncryptionUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticEncryptionUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionUpdateResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticEncryptionUpdateResponseError] -type zoneSettingOpportunisticEncryptionUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticEncryptionUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticEncryptionUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionUpdateResponseMessageJSON contains the JSON -// metadata for the struct -// [ZoneSettingOpportunisticEncryptionUpdateResponseMessage] -type zoneSettingOpportunisticEncryptionUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables the Opportunistic Encryption feature for a zone. -type ZoneSettingOpportunisticEncryptionUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOpportunisticEncryptionUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOpportunisticEncryptionUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingOpportunisticEncryptionUpdateResponseResultValue `json:"value"` - JSON zoneSettingOpportunisticEncryptionUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionUpdateResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticEncryptionUpdateResponseResult] -type zoneSettingOpportunisticEncryptionUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOpportunisticEncryptionUpdateResponseResultID string - -const ( - ZoneSettingOpportunisticEncryptionUpdateResponseResultIDOpportunisticEncryption ZoneSettingOpportunisticEncryptionUpdateResponseResultID = "opportunistic_encryption" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOpportunisticEncryptionUpdateResponseResultEditable bool - -const ( - ZoneSettingOpportunisticEncryptionUpdateResponseResultEditableTrue ZoneSettingOpportunisticEncryptionUpdateResponseResultEditable = true - ZoneSettingOpportunisticEncryptionUpdateResponseResultEditableFalse ZoneSettingOpportunisticEncryptionUpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticEncryptionUpdateResponseResultValue string - -const ( - ZoneSettingOpportunisticEncryptionUpdateResponseResultValueOn ZoneSettingOpportunisticEncryptionUpdateResponseResultValue = "on" - ZoneSettingOpportunisticEncryptionUpdateResponseResultValueOff ZoneSettingOpportunisticEncryptionUpdateResponseResultValue = "off" -) - -type ZoneSettingOpportunisticEncryptionListResponse struct { - Errors []ZoneSettingOpportunisticEncryptionListResponseError `json:"errors"` - Messages []ZoneSettingOpportunisticEncryptionListResponseMessage `json:"messages"` - // Enables the Opportunistic Encryption feature for a zone. - Result ZoneSettingOpportunisticEncryptionListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOpportunisticEncryptionListResponseJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionListResponseJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticEncryptionListResponse] -type zoneSettingOpportunisticEncryptionListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticEncryptionListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticEncryptionListResponseErrorJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionListResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticEncryptionListResponseError] -type zoneSettingOpportunisticEncryptionListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticEncryptionListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticEncryptionListResponseMessageJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionListResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticEncryptionListResponseMessage] -type zoneSettingOpportunisticEncryptionListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables the Opportunistic Encryption feature for a zone. -type ZoneSettingOpportunisticEncryptionListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOpportunisticEncryptionListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOpportunisticEncryptionListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingOpportunisticEncryptionListResponseResultValue `json:"value"` - JSON zoneSettingOpportunisticEncryptionListResponseResultJSON `json:"-"` -} - -// zoneSettingOpportunisticEncryptionListResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticEncryptionListResponseResult] -type zoneSettingOpportunisticEncryptionListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticEncryptionListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOpportunisticEncryptionListResponseResultID string - -const ( - ZoneSettingOpportunisticEncryptionListResponseResultIDOpportunisticEncryption ZoneSettingOpportunisticEncryptionListResponseResultID = "opportunistic_encryption" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOpportunisticEncryptionListResponseResultEditable bool - -const ( - ZoneSettingOpportunisticEncryptionListResponseResultEditableTrue ZoneSettingOpportunisticEncryptionListResponseResultEditable = true - ZoneSettingOpportunisticEncryptionListResponseResultEditableFalse ZoneSettingOpportunisticEncryptionListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticEncryptionListResponseResultValue string - -const ( - ZoneSettingOpportunisticEncryptionListResponseResultValueOn ZoneSettingOpportunisticEncryptionListResponseResultValue = "on" - ZoneSettingOpportunisticEncryptionListResponseResultValueOff ZoneSettingOpportunisticEncryptionListResponseResultValue = "off" -) - -type ZoneSettingOpportunisticEncryptionUpdateParams struct { - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingOpportunisticEncryptionUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingOpportunisticEncryptionUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticEncryptionUpdateParamsValue string - -const ( - ZoneSettingOpportunisticEncryptionUpdateParamsValueOn ZoneSettingOpportunisticEncryptionUpdateParamsValue = "on" - ZoneSettingOpportunisticEncryptionUpdateParamsValueOff ZoneSettingOpportunisticEncryptionUpdateParamsValue = "off" -) diff --git a/zonesettingopportunisticencryption_test.go b/zonesettingopportunisticencryption_test.go deleted file mode 100644 index 7c81c2249b2..00000000000 --- a/zonesettingopportunisticencryption_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingOpportunisticEncryptionUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OpportunisticEncryptions.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingOpportunisticEncryptionUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingOpportunisticEncryptionUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingOpportunisticEncryptionList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OpportunisticEncryptions.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingopportunisticonion.go b/zonesettingopportunisticonion.go deleted file mode 100644 index e356df64fb8..00000000000 --- a/zonesettingopportunisticonion.go +++ /dev/null @@ -1,310 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingOpportunisticOnionService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingOpportunisticOnionService] method instead. -type ZoneSettingOpportunisticOnionService struct { - Options []option.RequestOption -} - -// NewZoneSettingOpportunisticOnionService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingOpportunisticOnionService(opts ...option.RequestOption) (r *ZoneSettingOpportunisticOnionService) { - r = &ZoneSettingOpportunisticOnionService{} - r.Options = opts - return -} - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -func (r *ZoneSettingOpportunisticOnionService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingOpportunisticOnionUpdateParams, opts ...option.RequestOption) (res *ZoneSettingOpportunisticOnionUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/opportunistic_onion", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -func (r *ZoneSettingOpportunisticOnionService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingOpportunisticOnionListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/opportunistic_onion", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingOpportunisticOnionUpdateResponse struct { - Errors []ZoneSettingOpportunisticOnionUpdateResponseError `json:"errors"` - Messages []ZoneSettingOpportunisticOnionUpdateResponseMessage `json:"messages"` - // Add an Alt-Svc header to all legitimate requests from Tor, allowing the - // connection to use our onion services instead of exit nodes. - Result ZoneSettingOpportunisticOnionUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOpportunisticOnionUpdateResponseJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingOpportunisticOnionUpdateResponse] -type zoneSettingOpportunisticOnionUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticOnionUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticOnionUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticOnionUpdateResponseError] -type zoneSettingOpportunisticOnionUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticOnionUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticOnionUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionUpdateResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingOpportunisticOnionUpdateResponseMessage] -type zoneSettingOpportunisticOnionUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -type ZoneSettingOpportunisticOnionUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOpportunisticOnionUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOpportunisticOnionUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingOpportunisticOnionUpdateResponseResultValue `json:"value"` - JSON zoneSettingOpportunisticOnionUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticOnionUpdateResponseResult] -type zoneSettingOpportunisticOnionUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOpportunisticOnionUpdateResponseResultID string - -const ( - ZoneSettingOpportunisticOnionUpdateResponseResultIDOpportunisticOnion ZoneSettingOpportunisticOnionUpdateResponseResultID = "opportunistic_onion" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOpportunisticOnionUpdateResponseResultEditable bool - -const ( - ZoneSettingOpportunisticOnionUpdateResponseResultEditableTrue ZoneSettingOpportunisticOnionUpdateResponseResultEditable = true - ZoneSettingOpportunisticOnionUpdateResponseResultEditableFalse ZoneSettingOpportunisticOnionUpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticOnionUpdateResponseResultValue string - -const ( - ZoneSettingOpportunisticOnionUpdateResponseResultValueOn ZoneSettingOpportunisticOnionUpdateResponseResultValue = "on" - ZoneSettingOpportunisticOnionUpdateResponseResultValueOff ZoneSettingOpportunisticOnionUpdateResponseResultValue = "off" -) - -type ZoneSettingOpportunisticOnionListResponse struct { - Errors []ZoneSettingOpportunisticOnionListResponseError `json:"errors"` - Messages []ZoneSettingOpportunisticOnionListResponseMessage `json:"messages"` - // Add an Alt-Svc header to all legitimate requests from Tor, allowing the - // connection to use our onion services instead of exit nodes. - Result ZoneSettingOpportunisticOnionListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOpportunisticOnionListResponseJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingOpportunisticOnionListResponse] -type zoneSettingOpportunisticOnionListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticOnionListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticOnionListResponseErrorJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionListResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticOnionListResponseError] -type zoneSettingOpportunisticOnionListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOpportunisticOnionListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOpportunisticOnionListResponseMessageJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticOnionListResponseMessage] -type zoneSettingOpportunisticOnionListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Add an Alt-Svc header to all legitimate requests from Tor, allowing the -// connection to use our onion services instead of exit nodes. -type ZoneSettingOpportunisticOnionListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOpportunisticOnionListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOpportunisticOnionListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingOpportunisticOnionListResponseResultValue `json:"value"` - JSON zoneSettingOpportunisticOnionListResponseResultJSON `json:"-"` -} - -// zoneSettingOpportunisticOnionListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingOpportunisticOnionListResponseResult] -type zoneSettingOpportunisticOnionListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOpportunisticOnionListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOpportunisticOnionListResponseResultID string - -const ( - ZoneSettingOpportunisticOnionListResponseResultIDOpportunisticOnion ZoneSettingOpportunisticOnionListResponseResultID = "opportunistic_onion" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOpportunisticOnionListResponseResultEditable bool - -const ( - ZoneSettingOpportunisticOnionListResponseResultEditableTrue ZoneSettingOpportunisticOnionListResponseResultEditable = true - ZoneSettingOpportunisticOnionListResponseResultEditableFalse ZoneSettingOpportunisticOnionListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticOnionListResponseResultValue string - -const ( - ZoneSettingOpportunisticOnionListResponseResultValueOn ZoneSettingOpportunisticOnionListResponseResultValue = "on" - ZoneSettingOpportunisticOnionListResponseResultValueOff ZoneSettingOpportunisticOnionListResponseResultValue = "off" -) - -type ZoneSettingOpportunisticOnionUpdateParams struct { - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingOpportunisticOnionUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingOpportunisticOnionUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingOpportunisticOnionUpdateParamsValue string - -const ( - ZoneSettingOpportunisticOnionUpdateParamsValueOn ZoneSettingOpportunisticOnionUpdateParamsValue = "on" - ZoneSettingOpportunisticOnionUpdateParamsValueOff ZoneSettingOpportunisticOnionUpdateParamsValue = "off" -) diff --git a/zonesettingopportunisticonion_test.go b/zonesettingopportunisticonion_test.go deleted file mode 100644 index c902caecf7b..00000000000 --- a/zonesettingopportunisticonion_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingOpportunisticOnionUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OpportunisticOnions.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingOpportunisticOnionUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingOpportunisticOnionUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingOpportunisticOnionList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OpportunisticOnions.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingorangetoorange.go b/zonesettingorangetoorange.go deleted file mode 100644 index ed6ee89e2fb..00000000000 --- a/zonesettingorangetoorange.go +++ /dev/null @@ -1,334 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingOrangeToOrangeService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingOrangeToOrangeService] method instead. -type ZoneSettingOrangeToOrangeService struct { - Options []option.RequestOption -} - -// NewZoneSettingOrangeToOrangeService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingOrangeToOrangeService(opts ...option.RequestOption) (r *ZoneSettingOrangeToOrangeService) { - r = &ZoneSettingOrangeToOrangeService{} - r.Options = opts - return -} - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -func (r *ZoneSettingOrangeToOrangeService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingOrangeToOrangeUpdateParams, opts ...option.RequestOption) (res *ZoneSettingOrangeToOrangeUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/orange_to_orange", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -func (r *ZoneSettingOrangeToOrangeService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingOrangeToOrangeListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/orange_to_orange", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingOrangeToOrangeUpdateResponse struct { - Errors []ZoneSettingOrangeToOrangeUpdateResponseError `json:"errors"` - Messages []ZoneSettingOrangeToOrangeUpdateResponseMessage `json:"messages"` - // Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - // on Cloudflare. - Result ZoneSettingOrangeToOrangeUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOrangeToOrangeUpdateResponseJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingOrangeToOrangeUpdateResponse] -type zoneSettingOrangeToOrangeUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOrangeToOrangeUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOrangeToOrangeUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingOrangeToOrangeUpdateResponseError] -type zoneSettingOrangeToOrangeUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOrangeToOrangeUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOrangeToOrangeUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingOrangeToOrangeUpdateResponseMessage] -type zoneSettingOrangeToOrangeUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingOrangeToOrangeUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOrangeToOrangeUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOrangeToOrangeUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingOrangeToOrangeUpdateResponseResultValue `json:"value"` - JSON zoneSettingOrangeToOrangeUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingOrangeToOrangeUpdateResponseResult] -type zoneSettingOrangeToOrangeUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOrangeToOrangeUpdateResponseResultID string - -const ( - ZoneSettingOrangeToOrangeUpdateResponseResultIDOrangeToOrange ZoneSettingOrangeToOrangeUpdateResponseResultID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOrangeToOrangeUpdateResponseResultEditable bool - -const ( - ZoneSettingOrangeToOrangeUpdateResponseResultEditableTrue ZoneSettingOrangeToOrangeUpdateResponseResultEditable = true - ZoneSettingOrangeToOrangeUpdateResponseResultEditableFalse ZoneSettingOrangeToOrangeUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingOrangeToOrangeUpdateResponseResultValue string - -const ( - ZoneSettingOrangeToOrangeUpdateResponseResultValueOn ZoneSettingOrangeToOrangeUpdateResponseResultValue = "on" - ZoneSettingOrangeToOrangeUpdateResponseResultValueOff ZoneSettingOrangeToOrangeUpdateResponseResultValue = "off" -) - -type ZoneSettingOrangeToOrangeListResponse struct { - Errors []ZoneSettingOrangeToOrangeListResponseError `json:"errors"` - Messages []ZoneSettingOrangeToOrangeListResponseMessage `json:"messages"` - // Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - // on Cloudflare. - Result ZoneSettingOrangeToOrangeListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOrangeToOrangeListResponseJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingOrangeToOrangeListResponse] -type zoneSettingOrangeToOrangeListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOrangeToOrangeListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOrangeToOrangeListResponseErrorJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingOrangeToOrangeListResponseError] -type zoneSettingOrangeToOrangeListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOrangeToOrangeListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOrangeToOrangeListResponseMessageJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingOrangeToOrangeListResponseMessage] -type zoneSettingOrangeToOrangeListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingOrangeToOrangeListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOrangeToOrangeListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOrangeToOrangeListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingOrangeToOrangeListResponseResultValue `json:"value"` - JSON zoneSettingOrangeToOrangeListResponseResultJSON `json:"-"` -} - -// zoneSettingOrangeToOrangeListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingOrangeToOrangeListResponseResult] -type zoneSettingOrangeToOrangeListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOrangeToOrangeListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOrangeToOrangeListResponseResultID string - -const ( - ZoneSettingOrangeToOrangeListResponseResultIDOrangeToOrange ZoneSettingOrangeToOrangeListResponseResultID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOrangeToOrangeListResponseResultEditable bool - -const ( - ZoneSettingOrangeToOrangeListResponseResultEditableTrue ZoneSettingOrangeToOrangeListResponseResultEditable = true - ZoneSettingOrangeToOrangeListResponseResultEditableFalse ZoneSettingOrangeToOrangeListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingOrangeToOrangeListResponseResultValue string - -const ( - ZoneSettingOrangeToOrangeListResponseResultValueOn ZoneSettingOrangeToOrangeListResponseResultValue = "on" - ZoneSettingOrangeToOrangeListResponseResultValueOff ZoneSettingOrangeToOrangeListResponseResultValue = "off" -) - -type ZoneSettingOrangeToOrangeUpdateParams struct { - // Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also - // on Cloudflare. - Value param.Field[ZoneSettingOrangeToOrangeUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingOrangeToOrangeUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also -// on Cloudflare. -type ZoneSettingOrangeToOrangeUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingOrangeToOrangeUpdateParamsValueID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingOrangeToOrangeUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingOrangeToOrangeUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingOrangeToOrangeUpdateParamsValueID string - -const ( - ZoneSettingOrangeToOrangeUpdateParamsValueIDOrangeToOrange ZoneSettingOrangeToOrangeUpdateParamsValueID = "orange_to_orange" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOrangeToOrangeUpdateParamsValueEditable bool - -const ( - ZoneSettingOrangeToOrangeUpdateParamsValueEditableTrue ZoneSettingOrangeToOrangeUpdateParamsValueEditable = true - ZoneSettingOrangeToOrangeUpdateParamsValueEditableFalse ZoneSettingOrangeToOrangeUpdateParamsValueEditable = false -) - -// Value of the zone setting. -type ZoneSettingOrangeToOrangeUpdateParamsValueValue string - -const ( - ZoneSettingOrangeToOrangeUpdateParamsValueValueOn ZoneSettingOrangeToOrangeUpdateParamsValueValue = "on" - ZoneSettingOrangeToOrangeUpdateParamsValueValueOff ZoneSettingOrangeToOrangeUpdateParamsValueValue = "off" -) diff --git a/zonesettingorangetoorange_test.go b/zonesettingorangetoorange_test.go deleted file mode 100644 index a008ee48e8f..00000000000 --- a/zonesettingorangetoorange_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingOrangeToOrangeUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OrangeToOranges.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingOrangeToOrangeUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingOrangeToOrangeUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingOrangeToOrangeUpdateParamsValueIDOrangeToOrange), - Value: cloudflare.F(cloudflare.ZoneSettingOrangeToOrangeUpdateParamsValueValueOn), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingOrangeToOrangeList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OrangeToOranges.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingoriginerrorpagepassthrus.go b/zonesettingoriginerrorpagepassthrus.go deleted file mode 100644 index 19222e2fe5f..00000000000 --- a/zonesettingoriginerrorpagepassthrus.go +++ /dev/null @@ -1,313 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingOriginErrorPagePassThrusService contains methods and other services -// that help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingOriginErrorPagePassThrusService] method instead. -type ZoneSettingOriginErrorPagePassThrusService struct { - Options []option.RequestOption -} - -// NewZoneSettingOriginErrorPagePassThrusService generates a new service that -// applies the given options to each request. These options are applied after the -// parent client's options (if there is one), and before any request-specific -// options. -func NewZoneSettingOriginErrorPagePassThrusService(opts ...option.RequestOption) (r *ZoneSettingOriginErrorPagePassThrusService) { - r = &ZoneSettingOriginErrorPagePassThrusService{} - r.Options = opts - return -} - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -func (r *ZoneSettingOriginErrorPagePassThrusService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingOriginErrorPagePassThrusUpdateParams, opts ...option.RequestOption) (res *ZoneSettingOriginErrorPagePassThrusUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/origin_error_page_pass_thru", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -func (r *ZoneSettingOriginErrorPagePassThrusService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingOriginErrorPagePassThrusListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/origin_error_page_pass_thru", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingOriginErrorPagePassThrusUpdateResponse struct { - Errors []ZoneSettingOriginErrorPagePassThrusUpdateResponseError `json:"errors"` - Messages []ZoneSettingOriginErrorPagePassThrusUpdateResponseMessage `json:"messages"` - // Cloudflare will proxy customer error pages on any 502,504 errors on origin - // server instead of showing a default Cloudflare error page. This does not apply - // to 522 errors and is limited to Enterprise Zones. - Result ZoneSettingOriginErrorPagePassThrusUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOriginErrorPagePassThrusUpdateResponseJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusUpdateResponseJSON contains the JSON metadata -// for the struct [ZoneSettingOriginErrorPagePassThrusUpdateResponse] -type zoneSettingOriginErrorPagePassThrusUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginErrorPagePassThrusUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginErrorPagePassThrusUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusUpdateResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingOriginErrorPagePassThrusUpdateResponseError] -type zoneSettingOriginErrorPagePassThrusUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginErrorPagePassThrusUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginErrorPagePassThrusUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusUpdateResponseMessageJSON contains the JSON -// metadata for the struct -// [ZoneSettingOriginErrorPagePassThrusUpdateResponseMessage] -type zoneSettingOriginErrorPagePassThrusUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -type ZoneSettingOriginErrorPagePassThrusUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOriginErrorPagePassThrusUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValue `json:"value"` - JSON zoneSettingOriginErrorPagePassThrusUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusUpdateResponseResultJSON contains the JSON -// metadata for the struct -// [ZoneSettingOriginErrorPagePassThrusUpdateResponseResult] -type zoneSettingOriginErrorPagePassThrusUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOriginErrorPagePassThrusUpdateResponseResultID string - -const ( - ZoneSettingOriginErrorPagePassThrusUpdateResponseResultIDOriginErrorPagePassThru ZoneSettingOriginErrorPagePassThrusUpdateResponseResultID = "origin_error_page_pass_thru" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditable bool - -const ( - ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditableTrue ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditable = true - ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditableFalse ZoneSettingOriginErrorPagePassThrusUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValue string - -const ( - ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValueOn ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValue = "on" - ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValueOff ZoneSettingOriginErrorPagePassThrusUpdateResponseResultValue = "off" -) - -type ZoneSettingOriginErrorPagePassThrusListResponse struct { - Errors []ZoneSettingOriginErrorPagePassThrusListResponseError `json:"errors"` - Messages []ZoneSettingOriginErrorPagePassThrusListResponseMessage `json:"messages"` - // Cloudflare will proxy customer error pages on any 502,504 errors on origin - // server instead of showing a default Cloudflare error page. This does not apply - // to 522 errors and is limited to Enterprise Zones. - Result ZoneSettingOriginErrorPagePassThrusListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOriginErrorPagePassThrusListResponseJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusListResponseJSON contains the JSON metadata -// for the struct [ZoneSettingOriginErrorPagePassThrusListResponse] -type zoneSettingOriginErrorPagePassThrusListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginErrorPagePassThrusListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginErrorPagePassThrusListResponseErrorJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusListResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingOriginErrorPagePassThrusListResponseError] -type zoneSettingOriginErrorPagePassThrusListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginErrorPagePassThrusListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginErrorPagePassThrusListResponseMessageJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusListResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingOriginErrorPagePassThrusListResponseMessage] -type zoneSettingOriginErrorPagePassThrusListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will proxy customer error pages on any 502,504 errors on origin -// server instead of showing a default Cloudflare error page. This does not apply -// to 522 errors and is limited to Enterprise Zones. -type ZoneSettingOriginErrorPagePassThrusListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingOriginErrorPagePassThrusListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingOriginErrorPagePassThrusListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingOriginErrorPagePassThrusListResponseResultValue `json:"value"` - JSON zoneSettingOriginErrorPagePassThrusListResponseResultJSON `json:"-"` -} - -// zoneSettingOriginErrorPagePassThrusListResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingOriginErrorPagePassThrusListResponseResult] -type zoneSettingOriginErrorPagePassThrusListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginErrorPagePassThrusListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingOriginErrorPagePassThrusListResponseResultID string - -const ( - ZoneSettingOriginErrorPagePassThrusListResponseResultIDOriginErrorPagePassThru ZoneSettingOriginErrorPagePassThrusListResponseResultID = "origin_error_page_pass_thru" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingOriginErrorPagePassThrusListResponseResultEditable bool - -const ( - ZoneSettingOriginErrorPagePassThrusListResponseResultEditableTrue ZoneSettingOriginErrorPagePassThrusListResponseResultEditable = true - ZoneSettingOriginErrorPagePassThrusListResponseResultEditableFalse ZoneSettingOriginErrorPagePassThrusListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingOriginErrorPagePassThrusListResponseResultValue string - -const ( - ZoneSettingOriginErrorPagePassThrusListResponseResultValueOn ZoneSettingOriginErrorPagePassThrusListResponseResultValue = "on" - ZoneSettingOriginErrorPagePassThrusListResponseResultValueOff ZoneSettingOriginErrorPagePassThrusListResponseResultValue = "off" -) - -type ZoneSettingOriginErrorPagePassThrusUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingOriginErrorPagePassThrusUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingOriginErrorPagePassThrusUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingOriginErrorPagePassThrusUpdateParamsValue string - -const ( - ZoneSettingOriginErrorPagePassThrusUpdateParamsValueOn ZoneSettingOriginErrorPagePassThrusUpdateParamsValue = "on" - ZoneSettingOriginErrorPagePassThrusUpdateParamsValueOff ZoneSettingOriginErrorPagePassThrusUpdateParamsValue = "off" -) diff --git a/zonesettingoriginerrorpagepassthrus_test.go b/zonesettingoriginerrorpagepassthrus_test.go deleted file mode 100644 index d5831d526a7..00000000000 --- a/zonesettingoriginerrorpagepassthrus_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingOriginErrorPagePassThrusUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OriginErrorPagePassThrus.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingOriginErrorPagePassThrusUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingOriginErrorPagePassThrusUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingOriginErrorPagePassThrusList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OriginErrorPagePassThrus.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingoriginmaxhttpversion.go b/zonesettingoriginmaxhttpversion.go deleted file mode 100644 index ba08a995538..00000000000 --- a/zonesettingoriginmaxhttpversion.go +++ /dev/null @@ -1,259 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingOriginMaxHTTPVersionService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingOriginMaxHTTPVersionService] method instead. -type ZoneSettingOriginMaxHTTPVersionService struct { - Options []option.RequestOption -} - -// NewZoneSettingOriginMaxHTTPVersionService generates a new service that applies -// the given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingOriginMaxHTTPVersionService(opts ...option.RequestOption) (r *ZoneSettingOriginMaxHTTPVersionService) { - r = &ZoneSettingOriginMaxHTTPVersionService{} - r.Options = opts - return -} - -// The highest HTTP version Cloudflare will attempt to use with your origin. This -// setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to -// [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), -// for more information.). -func (r *ZoneSettingOriginMaxHTTPVersionService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingOriginMaxHTTPVersionUpdateParams, opts ...option.RequestOption) (res *ZoneSettingOriginMaxHTTPVersionUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/origin_max_http_version", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// The highest HTTP version Cloudflare will attempt to use with your origin. This -// setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to -// [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), -// for more information.). -func (r *ZoneSettingOriginMaxHTTPVersionService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingOriginMaxHTTPVersionListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/origin_max_http_version", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingOriginMaxHTTPVersionUpdateResponse struct { - Errors []ZoneSettingOriginMaxHTTPVersionUpdateResponseError `json:"errors"` - Messages []ZoneSettingOriginMaxHTTPVersionUpdateResponseMessage `json:"messages"` - Result ZoneSettingOriginMaxHTTPVersionUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOriginMaxHTTPVersionUpdateResponseJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingOriginMaxHTTPVersionUpdateResponse] -type zoneSettingOriginMaxHTTPVersionUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginMaxHTTPVersionUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionUpdateResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingOriginMaxHTTPVersionUpdateResponseError] -type zoneSettingOriginMaxHTTPVersionUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginMaxHTTPVersionUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionUpdateResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingOriginMaxHTTPVersionUpdateResponseMessage] -type zoneSettingOriginMaxHTTPVersionUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionUpdateResponseResult struct { - // Identifier of the zone setting. - ID ZoneSettingOriginMaxHTTPVersionUpdateResponseResultID `json:"id,required"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - JSON zoneSettingOriginMaxHTTPVersionUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionUpdateResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingOriginMaxHTTPVersionUpdateResponseResult] -type zoneSettingOriginMaxHTTPVersionUpdateResponseResultJSON struct { - ID apijson.Field - ModifiedOn apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Identifier of the zone setting. -type ZoneSettingOriginMaxHTTPVersionUpdateResponseResultID string - -const ( - ZoneSettingOriginMaxHTTPVersionUpdateResponseResultIDOriginMaxHTTPVersion ZoneSettingOriginMaxHTTPVersionUpdateResponseResultID = "origin_max_http_version" -) - -type ZoneSettingOriginMaxHTTPVersionListResponse struct { - Errors []ZoneSettingOriginMaxHTTPVersionListResponseError `json:"errors"` - Messages []ZoneSettingOriginMaxHTTPVersionListResponseMessage `json:"messages"` - Result ZoneSettingOriginMaxHTTPVersionListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingOriginMaxHTTPVersionListResponseJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionListResponseJSON contains the JSON metadata for -// the struct [ZoneSettingOriginMaxHTTPVersionListResponse] -type zoneSettingOriginMaxHTTPVersionListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginMaxHTTPVersionListResponseErrorJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionListResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingOriginMaxHTTPVersionListResponseError] -type zoneSettingOriginMaxHTTPVersionListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingOriginMaxHTTPVersionListResponseMessageJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionListResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingOriginMaxHTTPVersionListResponseMessage] -type zoneSettingOriginMaxHTTPVersionListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingOriginMaxHTTPVersionListResponseResult struct { - // Identifier of the zone setting. - ID ZoneSettingOriginMaxHTTPVersionListResponseResultID `json:"id,required"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - JSON zoneSettingOriginMaxHTTPVersionListResponseResultJSON `json:"-"` -} - -// zoneSettingOriginMaxHTTPVersionListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingOriginMaxHTTPVersionListResponseResult] -type zoneSettingOriginMaxHTTPVersionListResponseResultJSON struct { - ID apijson.Field - ModifiedOn apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingOriginMaxHTTPVersionListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Identifier of the zone setting. -type ZoneSettingOriginMaxHTTPVersionListResponseResultID string - -const ( - ZoneSettingOriginMaxHTTPVersionListResponseResultIDOriginMaxHTTPVersion ZoneSettingOriginMaxHTTPVersionListResponseResultID = "origin_max_http_version" -) - -type ZoneSettingOriginMaxHTTPVersionUpdateParams struct { - Value param.Field[ZoneSettingOriginMaxHTTPVersionUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingOriginMaxHTTPVersionUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ZoneSettingOriginMaxHTTPVersionUpdateParamsValue struct { - // Identifier of the zone setting. - ID param.Field[ZoneSettingOriginMaxHTTPVersionUpdateParamsValueID] `json:"id,required"` -} - -func (r ZoneSettingOriginMaxHTTPVersionUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Identifier of the zone setting. -type ZoneSettingOriginMaxHTTPVersionUpdateParamsValueID string - -const ( - ZoneSettingOriginMaxHTTPVersionUpdateParamsValueIDOriginMaxHTTPVersion ZoneSettingOriginMaxHTTPVersionUpdateParamsValueID = "origin_max_http_version" -) diff --git a/zonesettingoriginmaxhttpversion_test.go b/zonesettingoriginmaxhttpversion_test.go deleted file mode 100644 index e8d8afa5fa3..00000000000 --- a/zonesettingoriginmaxhttpversion_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingOriginMaxHTTPVersionUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OriginMaxHTTPVersions.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingOriginMaxHTTPVersionUpdateParamsValueIDOriginMaxHTTPVersion), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingOriginMaxHTTPVersionList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.OriginMaxHTTPVersions.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingpolish.go b/zonesettingpolish.go deleted file mode 100644 index 28ee6d7b3b7..00000000000 --- a/zonesettingpolish.go +++ /dev/null @@ -1,363 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingPolishService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingPolishService] method -// instead. -type ZoneSettingPolishService struct { - Options []option.RequestOption -} - -// NewZoneSettingPolishService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingPolishService(opts ...option.RequestOption) (r *ZoneSettingPolishService) { - r = &ZoneSettingPolishService{} - r.Options = opts - return -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) -// for more information. -func (r *ZoneSettingPolishService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingPolishUpdateParams, opts ...option.RequestOption) (res *ZoneSettingPolishUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/polish", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Automatically optimize image loading for website visitors on mobile devices. -// Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) -// for more information. -func (r *ZoneSettingPolishService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingPolishListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/polish", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingPolishUpdateResponse struct { - Errors []ZoneSettingPolishUpdateResponseError `json:"errors"` - Messages []ZoneSettingPolishUpdateResponseMessage `json:"messages"` - // Removes metadata and compresses your images for faster page load times. Basic - // (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - // quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - // image loading. Larger JPEGs are converted to progressive images, loading a - // lower-resolution image first and ending in a higher-resolution version. Not - // recommended for hi-res photography sites. - Result ZoneSettingPolishUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPolishUpdateResponseJSON `json:"-"` -} - -// zoneSettingPolishUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingPolishUpdateResponse] -type zoneSettingPolishUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPolishUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPolishUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingPolishUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingPolishUpdateResponseError] -type zoneSettingPolishUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPolishUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPolishUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingPolishUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingPolishUpdateResponseMessage] -type zoneSettingPolishUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingPolishUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingPolishUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPolishUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingPolishUpdateResponseResultValue `json:"value"` - JSON zoneSettingPolishUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingPolishUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingPolishUpdateResponseResult] -type zoneSettingPolishUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingPolishUpdateResponseResultID string - -const ( - ZoneSettingPolishUpdateResponseResultIDPolish ZoneSettingPolishUpdateResponseResultID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPolishUpdateResponseResultEditable bool - -const ( - ZoneSettingPolishUpdateResponseResultEditableTrue ZoneSettingPolishUpdateResponseResultEditable = true - ZoneSettingPolishUpdateResponseResultEditableFalse ZoneSettingPolishUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingPolishUpdateResponseResultValue string - -const ( - ZoneSettingPolishUpdateResponseResultValueOff ZoneSettingPolishUpdateResponseResultValue = "off" - ZoneSettingPolishUpdateResponseResultValueLossless ZoneSettingPolishUpdateResponseResultValue = "lossless" - ZoneSettingPolishUpdateResponseResultValueLossy ZoneSettingPolishUpdateResponseResultValue = "lossy" -) - -type ZoneSettingPolishListResponse struct { - Errors []ZoneSettingPolishListResponseError `json:"errors"` - Messages []ZoneSettingPolishListResponseMessage `json:"messages"` - // Removes metadata and compresses your images for faster page load times. Basic - // (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - // quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - // image loading. Larger JPEGs are converted to progressive images, loading a - // lower-resolution image first and ending in a higher-resolution version. Not - // recommended for hi-res photography sites. - Result ZoneSettingPolishListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPolishListResponseJSON `json:"-"` -} - -// zoneSettingPolishListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingPolishListResponse] -type zoneSettingPolishListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPolishListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPolishListResponseErrorJSON `json:"-"` -} - -// zoneSettingPolishListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingPolishListResponseError] -type zoneSettingPolishListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPolishListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPolishListResponseMessageJSON `json:"-"` -} - -// zoneSettingPolishListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingPolishListResponseMessage] -type zoneSettingPolishListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingPolishListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingPolishListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPolishListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingPolishListResponseResultValue `json:"value"` - JSON zoneSettingPolishListResponseResultJSON `json:"-"` -} - -// zoneSettingPolishListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingPolishListResponseResult] -type zoneSettingPolishListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPolishListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingPolishListResponseResultID string - -const ( - ZoneSettingPolishListResponseResultIDPolish ZoneSettingPolishListResponseResultID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPolishListResponseResultEditable bool - -const ( - ZoneSettingPolishListResponseResultEditableTrue ZoneSettingPolishListResponseResultEditable = true - ZoneSettingPolishListResponseResultEditableFalse ZoneSettingPolishListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingPolishListResponseResultValue string - -const ( - ZoneSettingPolishListResponseResultValueOff ZoneSettingPolishListResponseResultValue = "off" - ZoneSettingPolishListResponseResultValueLossless ZoneSettingPolishListResponseResultValue = "lossless" - ZoneSettingPolishListResponseResultValueLossy ZoneSettingPolishListResponseResultValue = "lossy" -) - -type ZoneSettingPolishUpdateParams struct { - // Removes metadata and compresses your images for faster page load times. Basic - // (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual - // quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster - // image loading. Larger JPEGs are converted to progressive images, loading a - // lower-resolution image first and ending in a higher-resolution version. Not - // recommended for hi-res photography sites. - Value param.Field[ZoneSettingPolishUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingPolishUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Removes metadata and compresses your images for faster page load times. Basic -// (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual -// quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster -// image loading. Larger JPEGs are converted to progressive images, loading a -// lower-resolution image first and ending in a higher-resolution version. Not -// recommended for hi-res photography sites. -type ZoneSettingPolishUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingPolishUpdateParamsValueID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingPolishUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingPolishUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingPolishUpdateParamsValueID string - -const ( - ZoneSettingPolishUpdateParamsValueIDPolish ZoneSettingPolishUpdateParamsValueID = "polish" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPolishUpdateParamsValueEditable bool - -const ( - ZoneSettingPolishUpdateParamsValueEditableTrue ZoneSettingPolishUpdateParamsValueEditable = true - ZoneSettingPolishUpdateParamsValueEditableFalse ZoneSettingPolishUpdateParamsValueEditable = false -) - -// Value of the zone setting. -type ZoneSettingPolishUpdateParamsValueValue string - -const ( - ZoneSettingPolishUpdateParamsValueValueOff ZoneSettingPolishUpdateParamsValueValue = "off" - ZoneSettingPolishUpdateParamsValueValueLossless ZoneSettingPolishUpdateParamsValueValue = "lossless" - ZoneSettingPolishUpdateParamsValueValueLossy ZoneSettingPolishUpdateParamsValueValue = "lossy" -) diff --git a/zonesettingpolish_test.go b/zonesettingpolish_test.go deleted file mode 100644 index 34c32d58c7a..00000000000 --- a/zonesettingpolish_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingPolishUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Polishes.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingPolishUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingPolishUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingPolishUpdateParamsValueIDPolish), - Value: cloudflare.F(cloudflare.ZoneSettingPolishUpdateParamsValueValueOff), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingPolishList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Polishes.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingprefetchpreload.go b/zonesettingprefetchpreload.go deleted file mode 100644 index a92fbb53457..00000000000 --- a/zonesettingprefetchpreload.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingPrefetchPreloadService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingPrefetchPreloadService] method instead. -type ZoneSettingPrefetchPreloadService struct { - Options []option.RequestOption -} - -// NewZoneSettingPrefetchPreloadService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingPrefetchPreloadService(opts ...option.RequestOption) (r *ZoneSettingPrefetchPreloadService) { - r = &ZoneSettingPrefetchPreloadService{} - r.Options = opts - return -} - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -func (r *ZoneSettingPrefetchPreloadService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingPrefetchPreloadUpdateParams, opts ...option.RequestOption) (res *ZoneSettingPrefetchPreloadUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/prefetch_preload", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -func (r *ZoneSettingPrefetchPreloadService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingPrefetchPreloadListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/prefetch_preload", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingPrefetchPreloadUpdateResponse struct { - Errors []ZoneSettingPrefetchPreloadUpdateResponseError `json:"errors"` - Messages []ZoneSettingPrefetchPreloadUpdateResponseMessage `json:"messages"` - // Cloudflare will prefetch any URLs that are included in the response headers. - // This is limited to Enterprise Zones. - Result ZoneSettingPrefetchPreloadUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPrefetchPreloadUpdateResponseJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingPrefetchPreloadUpdateResponse] -type zoneSettingPrefetchPreloadUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPrefetchPreloadUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPrefetchPreloadUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingPrefetchPreloadUpdateResponseError] -type zoneSettingPrefetchPreloadUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPrefetchPreloadUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPrefetchPreloadUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingPrefetchPreloadUpdateResponseMessage] -type zoneSettingPrefetchPreloadUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -type ZoneSettingPrefetchPreloadUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingPrefetchPreloadUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPrefetchPreloadUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingPrefetchPreloadUpdateResponseResultValue `json:"value"` - JSON zoneSettingPrefetchPreloadUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingPrefetchPreloadUpdateResponseResult] -type zoneSettingPrefetchPreloadUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingPrefetchPreloadUpdateResponseResultID string - -const ( - ZoneSettingPrefetchPreloadUpdateResponseResultIDPrefetchPreload ZoneSettingPrefetchPreloadUpdateResponseResultID = "prefetch_preload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPrefetchPreloadUpdateResponseResultEditable bool - -const ( - ZoneSettingPrefetchPreloadUpdateResponseResultEditableTrue ZoneSettingPrefetchPreloadUpdateResponseResultEditable = true - ZoneSettingPrefetchPreloadUpdateResponseResultEditableFalse ZoneSettingPrefetchPreloadUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingPrefetchPreloadUpdateResponseResultValue string - -const ( - ZoneSettingPrefetchPreloadUpdateResponseResultValueOn ZoneSettingPrefetchPreloadUpdateResponseResultValue = "on" - ZoneSettingPrefetchPreloadUpdateResponseResultValueOff ZoneSettingPrefetchPreloadUpdateResponseResultValue = "off" -) - -type ZoneSettingPrefetchPreloadListResponse struct { - Errors []ZoneSettingPrefetchPreloadListResponseError `json:"errors"` - Messages []ZoneSettingPrefetchPreloadListResponseMessage `json:"messages"` - // Cloudflare will prefetch any URLs that are included in the response headers. - // This is limited to Enterprise Zones. - Result ZoneSettingPrefetchPreloadListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPrefetchPreloadListResponseJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingPrefetchPreloadListResponse] -type zoneSettingPrefetchPreloadListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPrefetchPreloadListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPrefetchPreloadListResponseErrorJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingPrefetchPreloadListResponseError] -type zoneSettingPrefetchPreloadListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPrefetchPreloadListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPrefetchPreloadListResponseMessageJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingPrefetchPreloadListResponseMessage] -type zoneSettingPrefetchPreloadListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will prefetch any URLs that are included in the response headers. -// This is limited to Enterprise Zones. -type ZoneSettingPrefetchPreloadListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingPrefetchPreloadListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPrefetchPreloadListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingPrefetchPreloadListResponseResultValue `json:"value"` - JSON zoneSettingPrefetchPreloadListResponseResultJSON `json:"-"` -} - -// zoneSettingPrefetchPreloadListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingPrefetchPreloadListResponseResult] -type zoneSettingPrefetchPreloadListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPrefetchPreloadListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingPrefetchPreloadListResponseResultID string - -const ( - ZoneSettingPrefetchPreloadListResponseResultIDPrefetchPreload ZoneSettingPrefetchPreloadListResponseResultID = "prefetch_preload" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPrefetchPreloadListResponseResultEditable bool - -const ( - ZoneSettingPrefetchPreloadListResponseResultEditableTrue ZoneSettingPrefetchPreloadListResponseResultEditable = true - ZoneSettingPrefetchPreloadListResponseResultEditableFalse ZoneSettingPrefetchPreloadListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingPrefetchPreloadListResponseResultValue string - -const ( - ZoneSettingPrefetchPreloadListResponseResultValueOn ZoneSettingPrefetchPreloadListResponseResultValue = "on" - ZoneSettingPrefetchPreloadListResponseResultValueOff ZoneSettingPrefetchPreloadListResponseResultValue = "off" -) - -type ZoneSettingPrefetchPreloadUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingPrefetchPreloadUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingPrefetchPreloadUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingPrefetchPreloadUpdateParamsValue string - -const ( - ZoneSettingPrefetchPreloadUpdateParamsValueOn ZoneSettingPrefetchPreloadUpdateParamsValue = "on" - ZoneSettingPrefetchPreloadUpdateParamsValueOff ZoneSettingPrefetchPreloadUpdateParamsValue = "off" -) diff --git a/zonesettingprefetchpreload_test.go b/zonesettingprefetchpreload_test.go deleted file mode 100644 index 80c2e40f2e4..00000000000 --- a/zonesettingprefetchpreload_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingPrefetchPreloadUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.PrefetchPreloads.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingPrefetchPreloadUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingPrefetchPreloadUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingPrefetchPreloadList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.PrefetchPreloads.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingprivacypass.go b/zonesettingprivacypass.go deleted file mode 100644 index 0711d25ef58..00000000000 --- a/zonesettingprivacypass.go +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingPrivacyPassService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingPrivacyPassService] -// method instead. -type ZoneSettingPrivacyPassService struct { - Options []option.RequestOption -} - -// NewZoneSettingPrivacyPassService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingPrivacyPassService(opts ...option.RequestOption) (r *ZoneSettingPrivacyPassService) { - r = &ZoneSettingPrivacyPassService{} - r.Options = opts - return -} diff --git a/zonesettingproxyreadtimeout.go b/zonesettingproxyreadtimeout.go deleted file mode 100644 index e90f3e912e9..00000000000 --- a/zonesettingproxyreadtimeout.go +++ /dev/null @@ -1,302 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingProxyReadTimeoutService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingProxyReadTimeoutService] method instead. -type ZoneSettingProxyReadTimeoutService struct { - Options []option.RequestOption -} - -// NewZoneSettingProxyReadTimeoutService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingProxyReadTimeoutService(opts ...option.RequestOption) (r *ZoneSettingProxyReadTimeoutService) { - r = &ZoneSettingProxyReadTimeoutService{} - r.Options = opts - return -} - -// Maximum time between two read operations from origin. -func (r *ZoneSettingProxyReadTimeoutService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingProxyReadTimeoutUpdateParams, opts ...option.RequestOption) (res *ZoneSettingProxyReadTimeoutUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/proxy_read_timeout", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Maximum time between two read operations from origin. -func (r *ZoneSettingProxyReadTimeoutService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingProxyReadTimeoutListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/proxy_read_timeout", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingProxyReadTimeoutUpdateResponse struct { - Errors []ZoneSettingProxyReadTimeoutUpdateResponseError `json:"errors"` - Messages []ZoneSettingProxyReadTimeoutUpdateResponseMessage `json:"messages"` - // Maximum time between two read operations from origin. - Result ZoneSettingProxyReadTimeoutUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingProxyReadTimeoutUpdateResponseJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingProxyReadTimeoutUpdateResponse] -type zoneSettingProxyReadTimeoutUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingProxyReadTimeoutUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingProxyReadTimeoutUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingProxyReadTimeoutUpdateResponseError] -type zoneSettingProxyReadTimeoutUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingProxyReadTimeoutUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingProxyReadTimeoutUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingProxyReadTimeoutUpdateResponseMessage] -type zoneSettingProxyReadTimeoutUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Maximum time between two read operations from origin. -type ZoneSettingProxyReadTimeoutUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingProxyReadTimeoutUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingProxyReadTimeoutUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value float64 `json:"value"` - JSON zoneSettingProxyReadTimeoutUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingProxyReadTimeoutUpdateResponseResult] -type zoneSettingProxyReadTimeoutUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingProxyReadTimeoutUpdateResponseResultID string - -const ( - ZoneSettingProxyReadTimeoutUpdateResponseResultIDProxyReadTimeout ZoneSettingProxyReadTimeoutUpdateResponseResultID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingProxyReadTimeoutUpdateResponseResultEditable bool - -const ( - ZoneSettingProxyReadTimeoutUpdateResponseResultEditableTrue ZoneSettingProxyReadTimeoutUpdateResponseResultEditable = true - ZoneSettingProxyReadTimeoutUpdateResponseResultEditableFalse ZoneSettingProxyReadTimeoutUpdateResponseResultEditable = false -) - -type ZoneSettingProxyReadTimeoutListResponse struct { - Errors []ZoneSettingProxyReadTimeoutListResponseError `json:"errors"` - Messages []ZoneSettingProxyReadTimeoutListResponseMessage `json:"messages"` - // Maximum time between two read operations from origin. - Result ZoneSettingProxyReadTimeoutListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingProxyReadTimeoutListResponseJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingProxyReadTimeoutListResponse] -type zoneSettingProxyReadTimeoutListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingProxyReadTimeoutListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingProxyReadTimeoutListResponseErrorJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingProxyReadTimeoutListResponseError] -type zoneSettingProxyReadTimeoutListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingProxyReadTimeoutListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingProxyReadTimeoutListResponseMessageJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingProxyReadTimeoutListResponseMessage] -type zoneSettingProxyReadTimeoutListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Maximum time between two read operations from origin. -type ZoneSettingProxyReadTimeoutListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingProxyReadTimeoutListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingProxyReadTimeoutListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value float64 `json:"value"` - JSON zoneSettingProxyReadTimeoutListResponseResultJSON `json:"-"` -} - -// zoneSettingProxyReadTimeoutListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingProxyReadTimeoutListResponseResult] -type zoneSettingProxyReadTimeoutListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingProxyReadTimeoutListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingProxyReadTimeoutListResponseResultID string - -const ( - ZoneSettingProxyReadTimeoutListResponseResultIDProxyReadTimeout ZoneSettingProxyReadTimeoutListResponseResultID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingProxyReadTimeoutListResponseResultEditable bool - -const ( - ZoneSettingProxyReadTimeoutListResponseResultEditableTrue ZoneSettingProxyReadTimeoutListResponseResultEditable = true - ZoneSettingProxyReadTimeoutListResponseResultEditableFalse ZoneSettingProxyReadTimeoutListResponseResultEditable = false -) - -type ZoneSettingProxyReadTimeoutUpdateParams struct { - // Maximum time between two read operations from origin. - Value param.Field[ZoneSettingProxyReadTimeoutUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingProxyReadTimeoutUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Maximum time between two read operations from origin. -type ZoneSettingProxyReadTimeoutUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingProxyReadTimeoutUpdateParamsValueID] `json:"id"` - // Value of the zone setting. Notes: Value must be between 1 and 6000 - Value param.Field[float64] `json:"value"` -} - -func (r ZoneSettingProxyReadTimeoutUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingProxyReadTimeoutUpdateParamsValueID string - -const ( - ZoneSettingProxyReadTimeoutUpdateParamsValueIDProxyReadTimeout ZoneSettingProxyReadTimeoutUpdateParamsValueID = "proxy_read_timeout" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingProxyReadTimeoutUpdateParamsValueEditable bool - -const ( - ZoneSettingProxyReadTimeoutUpdateParamsValueEditableTrue ZoneSettingProxyReadTimeoutUpdateParamsValueEditable = true - ZoneSettingProxyReadTimeoutUpdateParamsValueEditableFalse ZoneSettingProxyReadTimeoutUpdateParamsValueEditable = false -) diff --git a/zonesettingproxyreadtimeout_test.go b/zonesettingproxyreadtimeout_test.go deleted file mode 100644 index c7196f38c5c..00000000000 --- a/zonesettingproxyreadtimeout_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingProxyReadTimeoutUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ProxyReadTimeouts.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingProxyReadTimeoutUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingProxyReadTimeoutUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingProxyReadTimeoutUpdateParamsValueIDProxyReadTimeout), - Value: cloudflare.F(0.000000), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingProxyReadTimeoutList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ProxyReadTimeouts.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingpseudoipv4.go b/zonesettingpseudoipv4.go deleted file mode 100644 index 88b4be67996..00000000000 --- a/zonesettingpseudoipv4.go +++ /dev/null @@ -1,301 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingPseudoIpv4Service contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingPseudoIpv4Service] -// method instead. -type ZoneSettingPseudoIpv4Service struct { - Options []option.RequestOption -} - -// NewZoneSettingPseudoIpv4Service generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingPseudoIpv4Service(opts ...option.RequestOption) (r *ZoneSettingPseudoIpv4Service) { - r = &ZoneSettingPseudoIpv4Service{} - r.Options = opts - return -} - -// Value of the Pseudo IPv4 setting. -func (r *ZoneSettingPseudoIpv4Service) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingPseudoIpv4UpdateParams, opts ...option.RequestOption) (res *ZoneSettingPseudoIpv4UpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/pseudo_ipv4", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Value of the Pseudo IPv4 setting. -func (r *ZoneSettingPseudoIpv4Service) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingPseudoIpv4ListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/pseudo_ipv4", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingPseudoIpv4UpdateResponse struct { - Errors []ZoneSettingPseudoIpv4UpdateResponseError `json:"errors"` - Messages []ZoneSettingPseudoIpv4UpdateResponseMessage `json:"messages"` - // The value set for the Pseudo IPv4 setting. - Result ZoneSettingPseudoIpv4UpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPseudoIpv4UpdateResponseJSON `json:"-"` -} - -// zoneSettingPseudoIpv4UpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4UpdateResponse] -type zoneSettingPseudoIpv4UpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4UpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPseudoIpv4UpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPseudoIpv4UpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingPseudoIpv4UpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4UpdateResponseError] -type zoneSettingPseudoIpv4UpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4UpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPseudoIpv4UpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPseudoIpv4UpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingPseudoIpv4UpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingPseudoIpv4UpdateResponseMessage] -type zoneSettingPseudoIpv4UpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4UpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The value set for the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4UpdateResponseResult struct { - // Value of the Pseudo IPv4 setting. - ID ZoneSettingPseudoIpv4UpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPseudoIpv4UpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the Pseudo IPv4 setting. - Value ZoneSettingPseudoIpv4UpdateResponseResultValue `json:"value"` - JSON zoneSettingPseudoIpv4UpdateResponseResultJSON `json:"-"` -} - -// zoneSettingPseudoIpv4UpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4UpdateResponseResult] -type zoneSettingPseudoIpv4UpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4UpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4UpdateResponseResultID string - -const ( - ZoneSettingPseudoIpv4UpdateResponseResultIDPseudoIpv4 ZoneSettingPseudoIpv4UpdateResponseResultID = "pseudo_ipv4" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPseudoIpv4UpdateResponseResultEditable bool - -const ( - ZoneSettingPseudoIpv4UpdateResponseResultEditableTrue ZoneSettingPseudoIpv4UpdateResponseResultEditable = true - ZoneSettingPseudoIpv4UpdateResponseResultEditableFalse ZoneSettingPseudoIpv4UpdateResponseResultEditable = false -) - -// Value of the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4UpdateResponseResultValue string - -const ( - ZoneSettingPseudoIpv4UpdateResponseResultValueOff ZoneSettingPseudoIpv4UpdateResponseResultValue = "off" - ZoneSettingPseudoIpv4UpdateResponseResultValueAddHeader ZoneSettingPseudoIpv4UpdateResponseResultValue = "add_header" - ZoneSettingPseudoIpv4UpdateResponseResultValueOverwriteHeader ZoneSettingPseudoIpv4UpdateResponseResultValue = "overwrite_header" -) - -type ZoneSettingPseudoIpv4ListResponse struct { - Errors []ZoneSettingPseudoIpv4ListResponseError `json:"errors"` - Messages []ZoneSettingPseudoIpv4ListResponseMessage `json:"messages"` - // The value set for the Pseudo IPv4 setting. - Result ZoneSettingPseudoIpv4ListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingPseudoIpv4ListResponseJSON `json:"-"` -} - -// zoneSettingPseudoIpv4ListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingPseudoIpv4ListResponse] -type zoneSettingPseudoIpv4ListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4ListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPseudoIpv4ListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPseudoIpv4ListResponseErrorJSON `json:"-"` -} - -// zoneSettingPseudoIpv4ListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4ListResponseError] -type zoneSettingPseudoIpv4ListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4ListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingPseudoIpv4ListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingPseudoIpv4ListResponseMessageJSON `json:"-"` -} - -// zoneSettingPseudoIpv4ListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4ListResponseMessage] -type zoneSettingPseudoIpv4ListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4ListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The value set for the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4ListResponseResult struct { - // Value of the Pseudo IPv4 setting. - ID ZoneSettingPseudoIpv4ListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingPseudoIpv4ListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the Pseudo IPv4 setting. - Value ZoneSettingPseudoIpv4ListResponseResultValue `json:"value"` - JSON zoneSettingPseudoIpv4ListResponseResultJSON `json:"-"` -} - -// zoneSettingPseudoIpv4ListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingPseudoIpv4ListResponseResult] -type zoneSettingPseudoIpv4ListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingPseudoIpv4ListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4ListResponseResultID string - -const ( - ZoneSettingPseudoIpv4ListResponseResultIDPseudoIpv4 ZoneSettingPseudoIpv4ListResponseResultID = "pseudo_ipv4" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingPseudoIpv4ListResponseResultEditable bool - -const ( - ZoneSettingPseudoIpv4ListResponseResultEditableTrue ZoneSettingPseudoIpv4ListResponseResultEditable = true - ZoneSettingPseudoIpv4ListResponseResultEditableFalse ZoneSettingPseudoIpv4ListResponseResultEditable = false -) - -// Value of the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4ListResponseResultValue string - -const ( - ZoneSettingPseudoIpv4ListResponseResultValueOff ZoneSettingPseudoIpv4ListResponseResultValue = "off" - ZoneSettingPseudoIpv4ListResponseResultValueAddHeader ZoneSettingPseudoIpv4ListResponseResultValue = "add_header" - ZoneSettingPseudoIpv4ListResponseResultValueOverwriteHeader ZoneSettingPseudoIpv4ListResponseResultValue = "overwrite_header" -) - -type ZoneSettingPseudoIpv4UpdateParams struct { - // Value of the Pseudo IPv4 setting. - Value param.Field[ZoneSettingPseudoIpv4UpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingPseudoIpv4UpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the Pseudo IPv4 setting. -type ZoneSettingPseudoIpv4UpdateParamsValue string - -const ( - ZoneSettingPseudoIpv4UpdateParamsValueOff ZoneSettingPseudoIpv4UpdateParamsValue = "off" - ZoneSettingPseudoIpv4UpdateParamsValueAddHeader ZoneSettingPseudoIpv4UpdateParamsValue = "add_header" - ZoneSettingPseudoIpv4UpdateParamsValueOverwriteHeader ZoneSettingPseudoIpv4UpdateParamsValue = "overwrite_header" -) diff --git a/zonesettingpseudoipv4_test.go b/zonesettingpseudoipv4_test.go deleted file mode 100644 index 540191b07d1..00000000000 --- a/zonesettingpseudoipv4_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingPseudoIpv4Update(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.PseudoIpv4s.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingPseudoIpv4UpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingPseudoIpv4UpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingPseudoIpv4List(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.PseudoIpv4s.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingresponsebuffering.go b/zonesettingresponsebuffering.go deleted file mode 100644 index 3d328c32e8a..00000000000 --- a/zonesettingresponsebuffering.go +++ /dev/null @@ -1,316 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingResponseBufferingService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingResponseBufferingService] method instead. -type ZoneSettingResponseBufferingService struct { - Options []option.RequestOption -} - -// NewZoneSettingResponseBufferingService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingResponseBufferingService(opts ...option.RequestOption) (r *ZoneSettingResponseBufferingService) { - r = &ZoneSettingResponseBufferingService{} - r.Options = opts - return -} - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -func (r *ZoneSettingResponseBufferingService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingResponseBufferingUpdateParams, opts ...option.RequestOption) (res *ZoneSettingResponseBufferingUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/response_buffering", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -func (r *ZoneSettingResponseBufferingService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingResponseBufferingListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/response_buffering", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingResponseBufferingUpdateResponse struct { - Errors []ZoneSettingResponseBufferingUpdateResponseError `json:"errors"` - Messages []ZoneSettingResponseBufferingUpdateResponseMessage `json:"messages"` - // Enables or disables buffering of responses from the proxied server. Cloudflare - // may buffer the whole payload to deliver it at once to the client versus allowing - // it to be delivered in chunks. By default, the proxied server streams directly - // and is not buffered by Cloudflare. This is limited to Enterprise Zones. - Result ZoneSettingResponseBufferingUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingResponseBufferingUpdateResponseJSON `json:"-"` -} - -// zoneSettingResponseBufferingUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingResponseBufferingUpdateResponse] -type zoneSettingResponseBufferingUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingResponseBufferingUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingResponseBufferingUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingResponseBufferingUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingResponseBufferingUpdateResponseError] -type zoneSettingResponseBufferingUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingResponseBufferingUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingResponseBufferingUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingResponseBufferingUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingResponseBufferingUpdateResponseMessage] -type zoneSettingResponseBufferingUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -type ZoneSettingResponseBufferingUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingResponseBufferingUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingResponseBufferingUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingResponseBufferingUpdateResponseResultValue `json:"value"` - JSON zoneSettingResponseBufferingUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingResponseBufferingUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingResponseBufferingUpdateResponseResult] -type zoneSettingResponseBufferingUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingResponseBufferingUpdateResponseResultID string - -const ( - ZoneSettingResponseBufferingUpdateResponseResultIDResponseBuffering ZoneSettingResponseBufferingUpdateResponseResultID = "response_buffering" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingResponseBufferingUpdateResponseResultEditable bool - -const ( - ZoneSettingResponseBufferingUpdateResponseResultEditableTrue ZoneSettingResponseBufferingUpdateResponseResultEditable = true - ZoneSettingResponseBufferingUpdateResponseResultEditableFalse ZoneSettingResponseBufferingUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingResponseBufferingUpdateResponseResultValue string - -const ( - ZoneSettingResponseBufferingUpdateResponseResultValueOn ZoneSettingResponseBufferingUpdateResponseResultValue = "on" - ZoneSettingResponseBufferingUpdateResponseResultValueOff ZoneSettingResponseBufferingUpdateResponseResultValue = "off" -) - -type ZoneSettingResponseBufferingListResponse struct { - Errors []ZoneSettingResponseBufferingListResponseError `json:"errors"` - Messages []ZoneSettingResponseBufferingListResponseMessage `json:"messages"` - // Enables or disables buffering of responses from the proxied server. Cloudflare - // may buffer the whole payload to deliver it at once to the client versus allowing - // it to be delivered in chunks. By default, the proxied server streams directly - // and is not buffered by Cloudflare. This is limited to Enterprise Zones. - Result ZoneSettingResponseBufferingListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingResponseBufferingListResponseJSON `json:"-"` -} - -// zoneSettingResponseBufferingListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingResponseBufferingListResponse] -type zoneSettingResponseBufferingListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingResponseBufferingListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingResponseBufferingListResponseErrorJSON `json:"-"` -} - -// zoneSettingResponseBufferingListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingResponseBufferingListResponseError] -type zoneSettingResponseBufferingListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingResponseBufferingListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingResponseBufferingListResponseMessageJSON `json:"-"` -} - -// zoneSettingResponseBufferingListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingResponseBufferingListResponseMessage] -type zoneSettingResponseBufferingListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables or disables buffering of responses from the proxied server. Cloudflare -// may buffer the whole payload to deliver it at once to the client versus allowing -// it to be delivered in chunks. By default, the proxied server streams directly -// and is not buffered by Cloudflare. This is limited to Enterprise Zones. -type ZoneSettingResponseBufferingListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingResponseBufferingListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingResponseBufferingListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingResponseBufferingListResponseResultValue `json:"value"` - JSON zoneSettingResponseBufferingListResponseResultJSON `json:"-"` -} - -// zoneSettingResponseBufferingListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingResponseBufferingListResponseResult] -type zoneSettingResponseBufferingListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingResponseBufferingListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingResponseBufferingListResponseResultID string - -const ( - ZoneSettingResponseBufferingListResponseResultIDResponseBuffering ZoneSettingResponseBufferingListResponseResultID = "response_buffering" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingResponseBufferingListResponseResultEditable bool - -const ( - ZoneSettingResponseBufferingListResponseResultEditableTrue ZoneSettingResponseBufferingListResponseResultEditable = true - ZoneSettingResponseBufferingListResponseResultEditableFalse ZoneSettingResponseBufferingListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingResponseBufferingListResponseResultValue string - -const ( - ZoneSettingResponseBufferingListResponseResultValueOn ZoneSettingResponseBufferingListResponseResultValue = "on" - ZoneSettingResponseBufferingListResponseResultValueOff ZoneSettingResponseBufferingListResponseResultValue = "off" -) - -type ZoneSettingResponseBufferingUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingResponseBufferingUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingResponseBufferingUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingResponseBufferingUpdateParamsValue string - -const ( - ZoneSettingResponseBufferingUpdateParamsValueOn ZoneSettingResponseBufferingUpdateParamsValue = "on" - ZoneSettingResponseBufferingUpdateParamsValueOff ZoneSettingResponseBufferingUpdateParamsValue = "off" -) diff --git a/zonesettingresponsebuffering_test.go b/zonesettingresponsebuffering_test.go deleted file mode 100644 index 33382805972..00000000000 --- a/zonesettingresponsebuffering_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingResponseBufferingUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ResponseBufferings.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingResponseBufferingUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingResponseBufferingUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingResponseBufferingList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ResponseBufferings.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingrocketloader.go b/zonesettingrocketloader.go deleted file mode 100644 index c0e28a67325..00000000000 --- a/zonesettingrocketloader.go +++ /dev/null @@ -1,398 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingRocketLoaderService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingRocketLoaderService] method instead. -type ZoneSettingRocketLoaderService struct { - Options []option.RequestOption -} - -// NewZoneSettingRocketLoaderService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingRocketLoaderService(opts ...option.RequestOption) (r *ZoneSettingRocketLoaderService) { - r = &ZoneSettingRocketLoaderService{} - r.Options = opts - return -} - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -func (r *ZoneSettingRocketLoaderService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingRocketLoaderUpdateParams, opts ...option.RequestOption) (res *ZoneSettingRocketLoaderUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/rocket_loader", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -func (r *ZoneSettingRocketLoaderService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingRocketLoaderListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/rocket_loader", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingRocketLoaderUpdateResponse struct { - Errors []ZoneSettingRocketLoaderUpdateResponseError `json:"errors"` - Messages []ZoneSettingRocketLoaderUpdateResponseMessage `json:"messages"` - // Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - // prioritises rendering your content while loading your site's Javascript - // asynchronously. Turning on Rocket Loader will immediately improve a web page's - // rendering time sometimes measured as Time to First Paint (TTFP), and also the - // `window.onload` time (assuming there is JavaScript on the page). This can have a - // positive impact on your Google search ranking. When turned on, Rocket Loader - // will automatically defer the loading of all Javascript referenced in your HTML, - // with no configuration required. Refer to - // [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - // for more information. - Result ZoneSettingRocketLoaderUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingRocketLoaderUpdateResponseJSON `json:"-"` -} - -// zoneSettingRocketLoaderUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingRocketLoaderUpdateResponse] -type zoneSettingRocketLoaderUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingRocketLoaderUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingRocketLoaderUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingRocketLoaderUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingRocketLoaderUpdateResponseError] -type zoneSettingRocketLoaderUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingRocketLoaderUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingRocketLoaderUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingRocketLoaderUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingRocketLoaderUpdateResponseMessage] -type zoneSettingRocketLoaderUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingRocketLoaderUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingRocketLoaderUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingRocketLoaderUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingRocketLoaderUpdateResponseResultValue `json:"value"` - JSON zoneSettingRocketLoaderUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingRocketLoaderUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingRocketLoaderUpdateResponseResult] -type zoneSettingRocketLoaderUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingRocketLoaderUpdateResponseResultID string - -const ( - ZoneSettingRocketLoaderUpdateResponseResultIDRocketLoader ZoneSettingRocketLoaderUpdateResponseResultID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingRocketLoaderUpdateResponseResultEditable bool - -const ( - ZoneSettingRocketLoaderUpdateResponseResultEditableTrue ZoneSettingRocketLoaderUpdateResponseResultEditable = true - ZoneSettingRocketLoaderUpdateResponseResultEditableFalse ZoneSettingRocketLoaderUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingRocketLoaderUpdateResponseResultValue string - -const ( - ZoneSettingRocketLoaderUpdateResponseResultValueOn ZoneSettingRocketLoaderUpdateResponseResultValue = "on" - ZoneSettingRocketLoaderUpdateResponseResultValueOff ZoneSettingRocketLoaderUpdateResponseResultValue = "off" -) - -type ZoneSettingRocketLoaderListResponse struct { - Errors []ZoneSettingRocketLoaderListResponseError `json:"errors"` - Messages []ZoneSettingRocketLoaderListResponseMessage `json:"messages"` - // Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - // prioritises rendering your content while loading your site's Javascript - // asynchronously. Turning on Rocket Loader will immediately improve a web page's - // rendering time sometimes measured as Time to First Paint (TTFP), and also the - // `window.onload` time (assuming there is JavaScript on the page). This can have a - // positive impact on your Google search ranking. When turned on, Rocket Loader - // will automatically defer the loading of all Javascript referenced in your HTML, - // with no configuration required. Refer to - // [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - // for more information. - Result ZoneSettingRocketLoaderListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingRocketLoaderListResponseJSON `json:"-"` -} - -// zoneSettingRocketLoaderListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingRocketLoaderListResponse] -type zoneSettingRocketLoaderListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingRocketLoaderListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingRocketLoaderListResponseErrorJSON `json:"-"` -} - -// zoneSettingRocketLoaderListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingRocketLoaderListResponseError] -type zoneSettingRocketLoaderListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingRocketLoaderListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingRocketLoaderListResponseMessageJSON `json:"-"` -} - -// zoneSettingRocketLoaderListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingRocketLoaderListResponseMessage] -type zoneSettingRocketLoaderListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingRocketLoaderListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingRocketLoaderListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingRocketLoaderListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingRocketLoaderListResponseResultValue `json:"value"` - JSON zoneSettingRocketLoaderListResponseResultJSON `json:"-"` -} - -// zoneSettingRocketLoaderListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingRocketLoaderListResponseResult] -type zoneSettingRocketLoaderListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingRocketLoaderListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingRocketLoaderListResponseResultID string - -const ( - ZoneSettingRocketLoaderListResponseResultIDRocketLoader ZoneSettingRocketLoaderListResponseResultID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingRocketLoaderListResponseResultEditable bool - -const ( - ZoneSettingRocketLoaderListResponseResultEditableTrue ZoneSettingRocketLoaderListResponseResultEditable = true - ZoneSettingRocketLoaderListResponseResultEditableFalse ZoneSettingRocketLoaderListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingRocketLoaderListResponseResultValue string - -const ( - ZoneSettingRocketLoaderListResponseResultValueOn ZoneSettingRocketLoaderListResponseResultValue = "on" - ZoneSettingRocketLoaderListResponseResultValueOff ZoneSettingRocketLoaderListResponseResultValue = "off" -) - -type ZoneSettingRocketLoaderUpdateParams struct { - // Rocket Loader is a general-purpose asynchronous JavaScript optimisation that - // prioritises rendering your content while loading your site's Javascript - // asynchronously. Turning on Rocket Loader will immediately improve a web page's - // rendering time sometimes measured as Time to First Paint (TTFP), and also the - // `window.onload` time (assuming there is JavaScript on the page). This can have a - // positive impact on your Google search ranking. When turned on, Rocket Loader - // will automatically defer the loading of all Javascript referenced in your HTML, - // with no configuration required. Refer to - // [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) - // for more information. - Value param.Field[ZoneSettingRocketLoaderUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingRocketLoaderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Rocket Loader is a general-purpose asynchronous JavaScript optimisation that -// prioritises rendering your content while loading your site's Javascript -// asynchronously. Turning on Rocket Loader will immediately improve a web page's -// rendering time sometimes measured as Time to First Paint (TTFP), and also the -// `window.onload` time (assuming there is JavaScript on the page). This can have a -// positive impact on your Google search ranking. When turned on, Rocket Loader -// will automatically defer the loading of all Javascript referenced in your HTML, -// with no configuration required. Refer to -// [Understanding Rocket Loader](https://support.cloudflare.com/hc/articles/200168056) -// for more information. -type ZoneSettingRocketLoaderUpdateParamsValue struct { - // ID of the zone setting. - ID param.Field[ZoneSettingRocketLoaderUpdateParamsValueID] `json:"id"` - // Value of the zone setting. - Value param.Field[ZoneSettingRocketLoaderUpdateParamsValueValue] `json:"value"` -} - -func (r ZoneSettingRocketLoaderUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// ID of the zone setting. -type ZoneSettingRocketLoaderUpdateParamsValueID string - -const ( - ZoneSettingRocketLoaderUpdateParamsValueIDRocketLoader ZoneSettingRocketLoaderUpdateParamsValueID = "rocket_loader" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingRocketLoaderUpdateParamsValueEditable bool - -const ( - ZoneSettingRocketLoaderUpdateParamsValueEditableTrue ZoneSettingRocketLoaderUpdateParamsValueEditable = true - ZoneSettingRocketLoaderUpdateParamsValueEditableFalse ZoneSettingRocketLoaderUpdateParamsValueEditable = false -) - -// Value of the zone setting. -type ZoneSettingRocketLoaderUpdateParamsValueValue string - -const ( - ZoneSettingRocketLoaderUpdateParamsValueValueOn ZoneSettingRocketLoaderUpdateParamsValueValue = "on" - ZoneSettingRocketLoaderUpdateParamsValueValueOff ZoneSettingRocketLoaderUpdateParamsValueValue = "off" -) diff --git a/zonesettingrocketloader_test.go b/zonesettingrocketloader_test.go deleted file mode 100644 index a5a1052ea7a..00000000000 --- a/zonesettingrocketloader_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingRocketLoaderUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.RocketLoaders.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingRocketLoaderUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingRocketLoaderUpdateParamsValue{ - ID: cloudflare.F(cloudflare.ZoneSettingRocketLoaderUpdateParamsValueIDRocketLoader), - Value: cloudflare.F(cloudflare.ZoneSettingRocketLoaderUpdateParamsValueValueOn), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingRocketLoaderList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.RocketLoaders.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingsecurityheader.go b/zonesettingsecurityheader.go deleted file mode 100644 index 71e8629799f..00000000000 --- a/zonesettingsecurityheader.go +++ /dev/null @@ -1,390 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingSecurityHeaderService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingSecurityHeaderService] method instead. -type ZoneSettingSecurityHeaderService struct { - Options []option.RequestOption -} - -// NewZoneSettingSecurityHeaderService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingSecurityHeaderService(opts ...option.RequestOption) (r *ZoneSettingSecurityHeaderService) { - r = &ZoneSettingSecurityHeaderService{} - r.Options = opts - return -} - -// Cloudflare security header for a zone. -func (r *ZoneSettingSecurityHeaderService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingSecurityHeaderUpdateParams, opts ...option.RequestOption) (res *ZoneSettingSecurityHeaderUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/security_header", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Cloudflare security header for a zone. -func (r *ZoneSettingSecurityHeaderService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingSecurityHeaderListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/security_header", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingSecurityHeaderUpdateResponse struct { - Errors []ZoneSettingSecurityHeaderUpdateResponseError `json:"errors"` - Messages []ZoneSettingSecurityHeaderUpdateResponseMessage `json:"messages"` - // Cloudflare security header for a zone. - Result ZoneSettingSecurityHeaderUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSecurityHeaderUpdateResponseJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSecurityHeaderUpdateResponse] -type zoneSettingSecurityHeaderUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityHeaderUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityHeaderUpdateResponseError] -type zoneSettingSecurityHeaderUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityHeaderUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingSecurityHeaderUpdateResponseMessage] -type zoneSettingSecurityHeaderUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare security header for a zone. -type ZoneSettingSecurityHeaderUpdateResponseResult struct { - // ID of the zone's security header. - ID ZoneSettingSecurityHeaderUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSecurityHeaderUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingSecurityHeaderUpdateResponseResultValue `json:"value"` - JSON zoneSettingSecurityHeaderUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityHeaderUpdateResponseResult] -type zoneSettingSecurityHeaderUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone's security header. -type ZoneSettingSecurityHeaderUpdateResponseResultID string - -const ( - ZoneSettingSecurityHeaderUpdateResponseResultIDSecurityHeader ZoneSettingSecurityHeaderUpdateResponseResultID = "security_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSecurityHeaderUpdateResponseResultEditable bool - -const ( - ZoneSettingSecurityHeaderUpdateResponseResultEditableTrue ZoneSettingSecurityHeaderUpdateResponseResultEditable = true - ZoneSettingSecurityHeaderUpdateResponseResultEditableFalse ZoneSettingSecurityHeaderUpdateResponseResultEditable = false -) - -type ZoneSettingSecurityHeaderUpdateResponseResultValue struct { - // Strict Transport Security. - StrictTransportSecurity ZoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurity `json:"strict_transport_security"` - JSON zoneSettingSecurityHeaderUpdateResponseResultValueJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseResultValueJSON contains the JSON -// metadata for the struct [ZoneSettingSecurityHeaderUpdateResponseResultValue] -type zoneSettingSecurityHeaderUpdateResponseResultValueJSON struct { - StrictTransportSecurity apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Strict Transport Security. -type ZoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled bool `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains bool `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge float64 `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff bool `json:"nosniff"` - JSON zoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurityJSON `json:"-"` -} - -// zoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurityJSON -// contains the JSON metadata for the struct -// [ZoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurity] -type zoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurityJSON struct { - Enabled apijson.Field - IncludeSubdomains apijson.Field - MaxAge apijson.Field - Nosniff apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderUpdateResponseResultValueStrictTransportSecurity) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderListResponse struct { - Errors []ZoneSettingSecurityHeaderListResponseError `json:"errors"` - Messages []ZoneSettingSecurityHeaderListResponseMessage `json:"messages"` - // Cloudflare security header for a zone. - Result ZoneSettingSecurityHeaderListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSecurityHeaderListResponseJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSecurityHeaderListResponse] -type zoneSettingSecurityHeaderListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityHeaderListResponseErrorJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityHeaderListResponseError] -type zoneSettingSecurityHeaderListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityHeaderListResponseMessageJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityHeaderListResponseMessage] -type zoneSettingSecurityHeaderListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare security header for a zone. -type ZoneSettingSecurityHeaderListResponseResult struct { - // ID of the zone's security header. - ID ZoneSettingSecurityHeaderListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSecurityHeaderListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - Value ZoneSettingSecurityHeaderListResponseResultValue `json:"value"` - JSON zoneSettingSecurityHeaderListResponseResultJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityHeaderListResponseResult] -type zoneSettingSecurityHeaderListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone's security header. -type ZoneSettingSecurityHeaderListResponseResultID string - -const ( - ZoneSettingSecurityHeaderListResponseResultIDSecurityHeader ZoneSettingSecurityHeaderListResponseResultID = "security_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSecurityHeaderListResponseResultEditable bool - -const ( - ZoneSettingSecurityHeaderListResponseResultEditableTrue ZoneSettingSecurityHeaderListResponseResultEditable = true - ZoneSettingSecurityHeaderListResponseResultEditableFalse ZoneSettingSecurityHeaderListResponseResultEditable = false -) - -type ZoneSettingSecurityHeaderListResponseResultValue struct { - // Strict Transport Security. - StrictTransportSecurity ZoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurity `json:"strict_transport_security"` - JSON zoneSettingSecurityHeaderListResponseResultValueJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseResultValueJSON contains the JSON metadata -// for the struct [ZoneSettingSecurityHeaderListResponseResultValue] -type zoneSettingSecurityHeaderListResponseResultValueJSON struct { - StrictTransportSecurity apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponseResultValue) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Strict Transport Security. -type ZoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled bool `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains bool `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge float64 `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff bool `json:"nosniff"` - JSON zoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurityJSON `json:"-"` -} - -// zoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurityJSON -// contains the JSON metadata for the struct -// [ZoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurity] -type zoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurityJSON struct { - Enabled apijson.Field - IncludeSubdomains apijson.Field - MaxAge apijson.Field - Nosniff apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityHeaderListResponseResultValueStrictTransportSecurity) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityHeaderUpdateParams struct { - Value param.Field[ZoneSettingSecurityHeaderUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingSecurityHeaderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ZoneSettingSecurityHeaderUpdateParamsValue struct { - // Strict Transport Security. - StrictTransportSecurity param.Field[ZoneSettingSecurityHeaderUpdateParamsValueStrictTransportSecurity] `json:"strict_transport_security"` -} - -func (r ZoneSettingSecurityHeaderUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Strict Transport Security. -type ZoneSettingSecurityHeaderUpdateParamsValueStrictTransportSecurity struct { - // Whether or not strict transport security is enabled. - Enabled param.Field[bool] `json:"enabled"` - // Include all subdomains for strict transport security. - IncludeSubdomains param.Field[bool] `json:"include_subdomains"` - // Max age in seconds of the strict transport security. - MaxAge param.Field[float64] `json:"max_age"` - // Whether or not to include 'X-Content-Type-Options: nosniff' header. - Nosniff param.Field[bool] `json:"nosniff"` -} - -func (r ZoneSettingSecurityHeaderUpdateParamsValueStrictTransportSecurity) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} diff --git a/zonesettingsecurityheader_test.go b/zonesettingsecurityheader_test.go deleted file mode 100644 index 0ac10f40e2f..00000000000 --- a/zonesettingsecurityheader_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingSecurityHeaderUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SecurityHeaders.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingSecurityHeaderUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingSecurityHeaderUpdateParamsValue{ - StrictTransportSecurity: cloudflare.F(cloudflare.ZoneSettingSecurityHeaderUpdateParamsValueStrictTransportSecurity{ - Enabled: cloudflare.F(true), - IncludeSubdomains: cloudflare.F(true), - MaxAge: cloudflare.F(86400.000000), - Nosniff: cloudflare.F(true), - }), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingSecurityHeaderList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SecurityHeaders.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingsecuritylevel.go b/zonesettingsecuritylevel.go deleted file mode 100644 index 625b44cecad..00000000000 --- a/zonesettingsecuritylevel.go +++ /dev/null @@ -1,328 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingSecurityLevelService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingSecurityLevelService] method instead. -type ZoneSettingSecurityLevelService struct { - Options []option.RequestOption -} - -// NewZoneSettingSecurityLevelService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingSecurityLevelService(opts ...option.RequestOption) (r *ZoneSettingSecurityLevelService) { - r = &ZoneSettingSecurityLevelService{} - r.Options = opts - return -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -func (r *ZoneSettingSecurityLevelService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingSecurityLevelUpdateParams, opts ...option.RequestOption) (res *ZoneSettingSecurityLevelUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/security_level", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -func (r *ZoneSettingSecurityLevelService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingSecurityLevelListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/security_level", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingSecurityLevelUpdateResponse struct { - Errors []ZoneSettingSecurityLevelUpdateResponseError `json:"errors"` - Messages []ZoneSettingSecurityLevelUpdateResponseMessage `json:"messages"` - // Choose the appropriate security profile for your website, which will - // automatically adjust each of the security settings. If you choose to customize - // an individual security setting, the profile will become Custom. - // (https://support.cloudflare.com/hc/en-us/articles/200170056). - Result ZoneSettingSecurityLevelUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSecurityLevelUpdateResponseJSON `json:"-"` -} - -// zoneSettingSecurityLevelUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSecurityLevelUpdateResponse] -type zoneSettingSecurityLevelUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityLevelUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityLevelUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingSecurityLevelUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityLevelUpdateResponseError] -type zoneSettingSecurityLevelUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityLevelUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityLevelUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingSecurityLevelUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityLevelUpdateResponseMessage] -type zoneSettingSecurityLevelUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -type ZoneSettingSecurityLevelUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSecurityLevelUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSecurityLevelUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingSecurityLevelUpdateResponseResultValue `json:"value"` - JSON zoneSettingSecurityLevelUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingSecurityLevelUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityLevelUpdateResponseResult] -type zoneSettingSecurityLevelUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSecurityLevelUpdateResponseResultID string - -const ( - ZoneSettingSecurityLevelUpdateResponseResultIDSecurityLevel ZoneSettingSecurityLevelUpdateResponseResultID = "security_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSecurityLevelUpdateResponseResultEditable bool - -const ( - ZoneSettingSecurityLevelUpdateResponseResultEditableTrue ZoneSettingSecurityLevelUpdateResponseResultEditable = true - ZoneSettingSecurityLevelUpdateResponseResultEditableFalse ZoneSettingSecurityLevelUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingSecurityLevelUpdateResponseResultValue string - -const ( - ZoneSettingSecurityLevelUpdateResponseResultValueOff ZoneSettingSecurityLevelUpdateResponseResultValue = "off" - ZoneSettingSecurityLevelUpdateResponseResultValueEssentiallyOff ZoneSettingSecurityLevelUpdateResponseResultValue = "essentially_off" - ZoneSettingSecurityLevelUpdateResponseResultValueLow ZoneSettingSecurityLevelUpdateResponseResultValue = "low" - ZoneSettingSecurityLevelUpdateResponseResultValueMedium ZoneSettingSecurityLevelUpdateResponseResultValue = "medium" - ZoneSettingSecurityLevelUpdateResponseResultValueHigh ZoneSettingSecurityLevelUpdateResponseResultValue = "high" - ZoneSettingSecurityLevelUpdateResponseResultValueUnderAttack ZoneSettingSecurityLevelUpdateResponseResultValue = "under_attack" -) - -type ZoneSettingSecurityLevelListResponse struct { - Errors []ZoneSettingSecurityLevelListResponseError `json:"errors"` - Messages []ZoneSettingSecurityLevelListResponseMessage `json:"messages"` - // Choose the appropriate security profile for your website, which will - // automatically adjust each of the security settings. If you choose to customize - // an individual security setting, the profile will become Custom. - // (https://support.cloudflare.com/hc/en-us/articles/200170056). - Result ZoneSettingSecurityLevelListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSecurityLevelListResponseJSON `json:"-"` -} - -// zoneSettingSecurityLevelListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSecurityLevelListResponse] -type zoneSettingSecurityLevelListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityLevelListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityLevelListResponseErrorJSON `json:"-"` -} - -// zoneSettingSecurityLevelListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingSecurityLevelListResponseError] -type zoneSettingSecurityLevelListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSecurityLevelListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSecurityLevelListResponseMessageJSON `json:"-"` -} - -// zoneSettingSecurityLevelListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityLevelListResponseMessage] -type zoneSettingSecurityLevelListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Choose the appropriate security profile for your website, which will -// automatically adjust each of the security settings. If you choose to customize -// an individual security setting, the profile will become Custom. -// (https://support.cloudflare.com/hc/en-us/articles/200170056). -type ZoneSettingSecurityLevelListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSecurityLevelListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSecurityLevelListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingSecurityLevelListResponseResultValue `json:"value"` - JSON zoneSettingSecurityLevelListResponseResultJSON `json:"-"` -} - -// zoneSettingSecurityLevelListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSecurityLevelListResponseResult] -type zoneSettingSecurityLevelListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSecurityLevelListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSecurityLevelListResponseResultID string - -const ( - ZoneSettingSecurityLevelListResponseResultIDSecurityLevel ZoneSettingSecurityLevelListResponseResultID = "security_level" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSecurityLevelListResponseResultEditable bool - -const ( - ZoneSettingSecurityLevelListResponseResultEditableTrue ZoneSettingSecurityLevelListResponseResultEditable = true - ZoneSettingSecurityLevelListResponseResultEditableFalse ZoneSettingSecurityLevelListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingSecurityLevelListResponseResultValue string - -const ( - ZoneSettingSecurityLevelListResponseResultValueOff ZoneSettingSecurityLevelListResponseResultValue = "off" - ZoneSettingSecurityLevelListResponseResultValueEssentiallyOff ZoneSettingSecurityLevelListResponseResultValue = "essentially_off" - ZoneSettingSecurityLevelListResponseResultValueLow ZoneSettingSecurityLevelListResponseResultValue = "low" - ZoneSettingSecurityLevelListResponseResultValueMedium ZoneSettingSecurityLevelListResponseResultValue = "medium" - ZoneSettingSecurityLevelListResponseResultValueHigh ZoneSettingSecurityLevelListResponseResultValue = "high" - ZoneSettingSecurityLevelListResponseResultValueUnderAttack ZoneSettingSecurityLevelListResponseResultValue = "under_attack" -) - -type ZoneSettingSecurityLevelUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingSecurityLevelUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingSecurityLevelUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingSecurityLevelUpdateParamsValue string - -const ( - ZoneSettingSecurityLevelUpdateParamsValueOff ZoneSettingSecurityLevelUpdateParamsValue = "off" - ZoneSettingSecurityLevelUpdateParamsValueEssentiallyOff ZoneSettingSecurityLevelUpdateParamsValue = "essentially_off" - ZoneSettingSecurityLevelUpdateParamsValueLow ZoneSettingSecurityLevelUpdateParamsValue = "low" - ZoneSettingSecurityLevelUpdateParamsValueMedium ZoneSettingSecurityLevelUpdateParamsValue = "medium" - ZoneSettingSecurityLevelUpdateParamsValueHigh ZoneSettingSecurityLevelUpdateParamsValue = "high" - ZoneSettingSecurityLevelUpdateParamsValueUnderAttack ZoneSettingSecurityLevelUpdateParamsValue = "under_attack" -) diff --git a/zonesettingsecuritylevel_test.go b/zonesettingsecuritylevel_test.go deleted file mode 100644 index 3aae34ac46b..00000000000 --- a/zonesettingsecuritylevel_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingSecurityLevelUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SecurityLevels.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingSecurityLevelUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingSecurityLevelUpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingSecurityLevelList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SecurityLevels.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingserversideexclude.go b/zonesettingserversideexclude.go deleted file mode 100644 index ef43af4b6fa..00000000000 --- a/zonesettingserversideexclude.go +++ /dev/null @@ -1,358 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingServerSideExcludeService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingServerSideExcludeService] method instead. -type ZoneSettingServerSideExcludeService struct { - Options []option.RequestOption -} - -// NewZoneSettingServerSideExcludeService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingServerSideExcludeService(opts ...option.RequestOption) (r *ZoneSettingServerSideExcludeService) { - r = &ZoneSettingServerSideExcludeService{} - r.Options = opts - return -} - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -func (r *ZoneSettingServerSideExcludeService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingServerSideExcludeUpdateParams, opts ...option.RequestOption) (res *ZoneSettingServerSideExcludeUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/server_side_exclude", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -func (r *ZoneSettingServerSideExcludeService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingServerSideExcludeListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/server_side_exclude", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingServerSideExcludeUpdateResponse struct { - Errors []ZoneSettingServerSideExcludeUpdateResponseError `json:"errors"` - Messages []ZoneSettingServerSideExcludeUpdateResponseMessage `json:"messages"` - // If there is sensitive content on your website that you want visible to real - // visitors, but that you want to hide from suspicious visitors, all you have to do - // is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - // be excluded from suspicious visitors in the following SSE tags: - // . For example: Bad visitors won't see my phone - // number, 555-555-5555 . Note: SSE only will work with HTML. If you - // have HTML minification enabled, you won't see the SSE tags in your HTML source - // when it's served through Cloudflare. SSE will still function in this case, as - // Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - // resource moves through our network to the visitor's computer. - // (https://support.cloudflare.com/hc/en-us/articles/200170036). - Result ZoneSettingServerSideExcludeUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingServerSideExcludeUpdateResponseJSON `json:"-"` -} - -// zoneSettingServerSideExcludeUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingServerSideExcludeUpdateResponse] -type zoneSettingServerSideExcludeUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingServerSideExcludeUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingServerSideExcludeUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingServerSideExcludeUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingServerSideExcludeUpdateResponseError] -type zoneSettingServerSideExcludeUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingServerSideExcludeUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingServerSideExcludeUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingServerSideExcludeUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingServerSideExcludeUpdateResponseMessage] -type zoneSettingServerSideExcludeUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -type ZoneSettingServerSideExcludeUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingServerSideExcludeUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingServerSideExcludeUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingServerSideExcludeUpdateResponseResultValue `json:"value"` - JSON zoneSettingServerSideExcludeUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingServerSideExcludeUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingServerSideExcludeUpdateResponseResult] -type zoneSettingServerSideExcludeUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingServerSideExcludeUpdateResponseResultID string - -const ( - ZoneSettingServerSideExcludeUpdateResponseResultIDServerSideExclude ZoneSettingServerSideExcludeUpdateResponseResultID = "server_side_exclude" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingServerSideExcludeUpdateResponseResultEditable bool - -const ( - ZoneSettingServerSideExcludeUpdateResponseResultEditableTrue ZoneSettingServerSideExcludeUpdateResponseResultEditable = true - ZoneSettingServerSideExcludeUpdateResponseResultEditableFalse ZoneSettingServerSideExcludeUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingServerSideExcludeUpdateResponseResultValue string - -const ( - ZoneSettingServerSideExcludeUpdateResponseResultValueOn ZoneSettingServerSideExcludeUpdateResponseResultValue = "on" - ZoneSettingServerSideExcludeUpdateResponseResultValueOff ZoneSettingServerSideExcludeUpdateResponseResultValue = "off" -) - -type ZoneSettingServerSideExcludeListResponse struct { - Errors []ZoneSettingServerSideExcludeListResponseError `json:"errors"` - Messages []ZoneSettingServerSideExcludeListResponseMessage `json:"messages"` - // If there is sensitive content on your website that you want visible to real - // visitors, but that you want to hide from suspicious visitors, all you have to do - // is wrap the content with Cloudflare SSE tags. Wrap any content that you want to - // be excluded from suspicious visitors in the following SSE tags: - // . For example: Bad visitors won't see my phone - // number, 555-555-5555 . Note: SSE only will work with HTML. If you - // have HTML minification enabled, you won't see the SSE tags in your HTML source - // when it's served through Cloudflare. SSE will still function in this case, as - // Cloudflare's HTML minification and SSE functionality occur on-the-fly as the - // resource moves through our network to the visitor's computer. - // (https://support.cloudflare.com/hc/en-us/articles/200170036). - Result ZoneSettingServerSideExcludeListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingServerSideExcludeListResponseJSON `json:"-"` -} - -// zoneSettingServerSideExcludeListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingServerSideExcludeListResponse] -type zoneSettingServerSideExcludeListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingServerSideExcludeListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingServerSideExcludeListResponseErrorJSON `json:"-"` -} - -// zoneSettingServerSideExcludeListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingServerSideExcludeListResponseError] -type zoneSettingServerSideExcludeListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingServerSideExcludeListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingServerSideExcludeListResponseMessageJSON `json:"-"` -} - -// zoneSettingServerSideExcludeListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingServerSideExcludeListResponseMessage] -type zoneSettingServerSideExcludeListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// If there is sensitive content on your website that you want visible to real -// visitors, but that you want to hide from suspicious visitors, all you have to do -// is wrap the content with Cloudflare SSE tags. Wrap any content that you want to -// be excluded from suspicious visitors in the following SSE tags: -// . For example: Bad visitors won't see my phone -// number, 555-555-5555 . Note: SSE only will work with HTML. If you -// have HTML minification enabled, you won't see the SSE tags in your HTML source -// when it's served through Cloudflare. SSE will still function in this case, as -// Cloudflare's HTML minification and SSE functionality occur on-the-fly as the -// resource moves through our network to the visitor's computer. -// (https://support.cloudflare.com/hc/en-us/articles/200170036). -type ZoneSettingServerSideExcludeListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingServerSideExcludeListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingServerSideExcludeListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingServerSideExcludeListResponseResultValue `json:"value"` - JSON zoneSettingServerSideExcludeListResponseResultJSON `json:"-"` -} - -// zoneSettingServerSideExcludeListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingServerSideExcludeListResponseResult] -type zoneSettingServerSideExcludeListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingServerSideExcludeListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingServerSideExcludeListResponseResultID string - -const ( - ZoneSettingServerSideExcludeListResponseResultIDServerSideExclude ZoneSettingServerSideExcludeListResponseResultID = "server_side_exclude" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingServerSideExcludeListResponseResultEditable bool - -const ( - ZoneSettingServerSideExcludeListResponseResultEditableTrue ZoneSettingServerSideExcludeListResponseResultEditable = true - ZoneSettingServerSideExcludeListResponseResultEditableFalse ZoneSettingServerSideExcludeListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingServerSideExcludeListResponseResultValue string - -const ( - ZoneSettingServerSideExcludeListResponseResultValueOn ZoneSettingServerSideExcludeListResponseResultValue = "on" - ZoneSettingServerSideExcludeListResponseResultValueOff ZoneSettingServerSideExcludeListResponseResultValue = "off" -) - -type ZoneSettingServerSideExcludeUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingServerSideExcludeUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingServerSideExcludeUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingServerSideExcludeUpdateParamsValue string - -const ( - ZoneSettingServerSideExcludeUpdateParamsValueOn ZoneSettingServerSideExcludeUpdateParamsValue = "on" - ZoneSettingServerSideExcludeUpdateParamsValueOff ZoneSettingServerSideExcludeUpdateParamsValue = "off" -) diff --git a/zonesettingserversideexclude_test.go b/zonesettingserversideexclude_test.go deleted file mode 100644 index 00443d2b980..00000000000 --- a/zonesettingserversideexclude_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingServerSideExcludeUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ServerSideExcludes.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingServerSideExcludeUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingServerSideExcludeUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingServerSideExcludeList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.ServerSideExcludes.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingsortquerystringforcach.go b/zonesettingsortquerystringforcach.go deleted file mode 100644 index c994090124e..00000000000 --- a/zonesettingsortquerystringforcach.go +++ /dev/null @@ -1,310 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingSortQueryStringForCachService contains methods and other services -// that help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingSortQueryStringForCachService] method instead. -type ZoneSettingSortQueryStringForCachService struct { - Options []option.RequestOption -} - -// NewZoneSettingSortQueryStringForCachService generates a new service that applies -// the given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingSortQueryStringForCachService(opts ...option.RequestOption) (r *ZoneSettingSortQueryStringForCachService) { - r = &ZoneSettingSortQueryStringForCachService{} - r.Options = opts - return -} - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -func (r *ZoneSettingSortQueryStringForCachService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingSortQueryStringForCachUpdateParams, opts ...option.RequestOption) (res *ZoneSettingSortQueryStringForCachUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/sort_query_string_for_cache", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -func (r *ZoneSettingSortQueryStringForCachService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingSortQueryStringForCachListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/sort_query_string_for_cache", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingSortQueryStringForCachUpdateResponse struct { - Errors []ZoneSettingSortQueryStringForCachUpdateResponseError `json:"errors"` - Messages []ZoneSettingSortQueryStringForCachUpdateResponseMessage `json:"messages"` - // Cloudflare will treat files with the same query strings as the same file in - // cache, regardless of the order of the query strings. This is limited to - // Enterprise Zones. - Result ZoneSettingSortQueryStringForCachUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSortQueryStringForCachUpdateResponseJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachUpdateResponseJSON contains the JSON metadata -// for the struct [ZoneSettingSortQueryStringForCachUpdateResponse] -type zoneSettingSortQueryStringForCachUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSortQueryStringForCachUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSortQueryStringForCachUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachUpdateResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachUpdateResponseError] -type zoneSettingSortQueryStringForCachUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSortQueryStringForCachUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSortQueryStringForCachUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachUpdateResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachUpdateResponseMessage] -type zoneSettingSortQueryStringForCachUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -type ZoneSettingSortQueryStringForCachUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSortQueryStringForCachUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSortQueryStringForCachUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingSortQueryStringForCachUpdateResponseResultValue `json:"value"` - JSON zoneSettingSortQueryStringForCachUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachUpdateResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachUpdateResponseResult] -type zoneSettingSortQueryStringForCachUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSortQueryStringForCachUpdateResponseResultID string - -const ( - ZoneSettingSortQueryStringForCachUpdateResponseResultIDSortQueryStringForCache ZoneSettingSortQueryStringForCachUpdateResponseResultID = "sort_query_string_for_cache" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSortQueryStringForCachUpdateResponseResultEditable bool - -const ( - ZoneSettingSortQueryStringForCachUpdateResponseResultEditableTrue ZoneSettingSortQueryStringForCachUpdateResponseResultEditable = true - ZoneSettingSortQueryStringForCachUpdateResponseResultEditableFalse ZoneSettingSortQueryStringForCachUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingSortQueryStringForCachUpdateResponseResultValue string - -const ( - ZoneSettingSortQueryStringForCachUpdateResponseResultValueOn ZoneSettingSortQueryStringForCachUpdateResponseResultValue = "on" - ZoneSettingSortQueryStringForCachUpdateResponseResultValueOff ZoneSettingSortQueryStringForCachUpdateResponseResultValue = "off" -) - -type ZoneSettingSortQueryStringForCachListResponse struct { - Errors []ZoneSettingSortQueryStringForCachListResponseError `json:"errors"` - Messages []ZoneSettingSortQueryStringForCachListResponseMessage `json:"messages"` - // Cloudflare will treat files with the same query strings as the same file in - // cache, regardless of the order of the query strings. This is limited to - // Enterprise Zones. - Result ZoneSettingSortQueryStringForCachListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSortQueryStringForCachListResponseJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachListResponseJSON contains the JSON metadata for -// the struct [ZoneSettingSortQueryStringForCachListResponse] -type zoneSettingSortQueryStringForCachListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSortQueryStringForCachListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSortQueryStringForCachListResponseErrorJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachListResponseErrorJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachListResponseError] -type zoneSettingSortQueryStringForCachListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSortQueryStringForCachListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSortQueryStringForCachListResponseMessageJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachListResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachListResponseMessage] -type zoneSettingSortQueryStringForCachListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Cloudflare will treat files with the same query strings as the same file in -// cache, regardless of the order of the query strings. This is limited to -// Enterprise Zones. -type ZoneSettingSortQueryStringForCachListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSortQueryStringForCachListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSortQueryStringForCachListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingSortQueryStringForCachListResponseResultValue `json:"value"` - JSON zoneSettingSortQueryStringForCachListResponseResultJSON `json:"-"` -} - -// zoneSettingSortQueryStringForCachListResponseResultJSON contains the JSON -// metadata for the struct [ZoneSettingSortQueryStringForCachListResponseResult] -type zoneSettingSortQueryStringForCachListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSortQueryStringForCachListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSortQueryStringForCachListResponseResultID string - -const ( - ZoneSettingSortQueryStringForCachListResponseResultIDSortQueryStringForCache ZoneSettingSortQueryStringForCachListResponseResultID = "sort_query_string_for_cache" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSortQueryStringForCachListResponseResultEditable bool - -const ( - ZoneSettingSortQueryStringForCachListResponseResultEditableTrue ZoneSettingSortQueryStringForCachListResponseResultEditable = true - ZoneSettingSortQueryStringForCachListResponseResultEditableFalse ZoneSettingSortQueryStringForCachListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingSortQueryStringForCachListResponseResultValue string - -const ( - ZoneSettingSortQueryStringForCachListResponseResultValueOn ZoneSettingSortQueryStringForCachListResponseResultValue = "on" - ZoneSettingSortQueryStringForCachListResponseResultValueOff ZoneSettingSortQueryStringForCachListResponseResultValue = "off" -) - -type ZoneSettingSortQueryStringForCachUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingSortQueryStringForCachUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingSortQueryStringForCachUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingSortQueryStringForCachUpdateParamsValue string - -const ( - ZoneSettingSortQueryStringForCachUpdateParamsValueOn ZoneSettingSortQueryStringForCachUpdateParamsValue = "on" - ZoneSettingSortQueryStringForCachUpdateParamsValueOff ZoneSettingSortQueryStringForCachUpdateParamsValue = "off" -) diff --git a/zonesettingsortquerystringforcach_test.go b/zonesettingsortquerystringforcach_test.go deleted file mode 100644 index 2fc9d5f15c0..00000000000 --- a/zonesettingsortquerystringforcach_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingSortQueryStringForCachUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SortQueryStringForCaches.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingSortQueryStringForCachUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingSortQueryStringForCachUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingSortQueryStringForCachList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SortQueryStringForCaches.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingssl.go b/zonesettingssl.go deleted file mode 100644 index 1f36209a28d..00000000000 --- a/zonesettingssl.go +++ /dev/null @@ -1,394 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingSSLService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingSSLService] method -// instead. -type ZoneSettingSSLService struct { - Options []option.RequestOption -} - -// NewZoneSettingSSLService generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingSSLService(opts ...option.RequestOption) (r *ZoneSettingSSLService) { - r = &ZoneSettingSSLService{} - r.Options = opts - return -} - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -func (r *ZoneSettingSSLService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingSSLUpdateParams, opts ...option.RequestOption) (res *ZoneSettingSSLUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ssl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -func (r *ZoneSettingSSLService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingSSLListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ssl", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingSSLUpdateResponse struct { - Errors []ZoneSettingSSLUpdateResponseError `json:"errors"` - Messages []ZoneSettingSSLUpdateResponseMessage `json:"messages"` - // SSL encrypts your visitor's connection and safeguards credit card numbers and - // other personal data to and from your website. SSL can take up to 5 minutes to - // fully activate. Requires Cloudflare active on your root domain or www domain. - // Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - // and your web server (all HTTP traffic). Flexible: SSL between the visitor and - // Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - // your web server. You don't need to have an SSL cert on your web server, but your - // vistors will still see the site as being HTTPS enabled. Full: SSL between the - // visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - // Cloudflare and your web server. You'll need to have your own SSL cert or - // self-signed cert at the very least. Full (Strict): SSL between the visitor and - // Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - // your web server. You'll need to have a valid SSL certificate installed on your - // web server. This certificate must be signed by a certificate authority, have an - // expiration date in the future, and respond for the request domain name - // (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - Result ZoneSettingSSLUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSSLUpdateResponseJSON `json:"-"` -} - -// zoneSettingSSLUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingSSLUpdateResponse] -type zoneSettingSSLUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingSSLUpdateResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingSSLUpdateResponseError] -type zoneSettingSSLUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingSSLUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingSSLUpdateResponseMessage] -type zoneSettingSSLUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -type ZoneSettingSSLUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSSLUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSSLUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Depends on the zone's plan level - Value ZoneSettingSSLUpdateResponseResultValue `json:"value"` - JSON zoneSettingSSLUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingSSLUpdateResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingSSLUpdateResponseResult] -type zoneSettingSSLUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSSLUpdateResponseResultID string - -const ( - ZoneSettingSSLUpdateResponseResultIDSSL ZoneSettingSSLUpdateResponseResultID = "ssl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSSLUpdateResponseResultEditable bool - -const ( - ZoneSettingSSLUpdateResponseResultEditableTrue ZoneSettingSSLUpdateResponseResultEditable = true - ZoneSettingSSLUpdateResponseResultEditableFalse ZoneSettingSSLUpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingSSLUpdateResponseResultValue string - -const ( - ZoneSettingSSLUpdateResponseResultValueOff ZoneSettingSSLUpdateResponseResultValue = "off" - ZoneSettingSSLUpdateResponseResultValueFlexible ZoneSettingSSLUpdateResponseResultValue = "flexible" - ZoneSettingSSLUpdateResponseResultValueFull ZoneSettingSSLUpdateResponseResultValue = "full" - ZoneSettingSSLUpdateResponseResultValueStrict ZoneSettingSSLUpdateResponseResultValue = "strict" -) - -type ZoneSettingSSLListResponse struct { - Errors []ZoneSettingSSLListResponseError `json:"errors"` - Messages []ZoneSettingSSLListResponseMessage `json:"messages"` - // SSL encrypts your visitor's connection and safeguards credit card numbers and - // other personal data to and from your website. SSL can take up to 5 minutes to - // fully activate. Requires Cloudflare active on your root domain or www domain. - // Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare - // and your web server (all HTTP traffic). Flexible: SSL between the visitor and - // Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and - // your web server. You don't need to have an SSL cert on your web server, but your - // vistors will still see the site as being HTTPS enabled. Full: SSL between the - // visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between - // Cloudflare and your web server. You'll need to have your own SSL cert or - // self-signed cert at the very least. Full (Strict): SSL between the visitor and - // Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and - // your web server. You'll need to have a valid SSL certificate installed on your - // web server. This certificate must be signed by a certificate authority, have an - // expiration date in the future, and respond for the request domain name - // (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). - Result ZoneSettingSSLListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSSLListResponseJSON `json:"-"` -} - -// zoneSettingSSLListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingSSLListResponse] -type zoneSettingSSLListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLListResponseErrorJSON `json:"-"` -} - -// zoneSettingSSLListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingSSLListResponseError] -type zoneSettingSSLListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLListResponseMessageJSON `json:"-"` -} - -// zoneSettingSSLListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingSSLListResponseMessage] -type zoneSettingSSLListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// SSL encrypts your visitor's connection and safeguards credit card numbers and -// other personal data to and from your website. SSL can take up to 5 minutes to -// fully activate. Requires Cloudflare active on your root domain or www domain. -// Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare -// and your web server (all HTTP traffic). Flexible: SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and -// your web server. You don't need to have an SSL cert on your web server, but your -// vistors will still see the site as being HTTPS enabled. Full: SSL between the -// visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between -// Cloudflare and your web server. You'll need to have your own SSL cert or -// self-signed cert at the very least. Full (Strict): SSL between the visitor and -// Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and -// your web server. You'll need to have a valid SSL certificate installed on your -// web server. This certificate must be signed by a certificate authority, have an -// expiration date in the future, and respond for the request domain name -// (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416). -type ZoneSettingSSLListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingSSLListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingSSLListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Depends on the zone's plan level - Value ZoneSettingSSLListResponseResultValue `json:"value"` - JSON zoneSettingSSLListResponseResultJSON `json:"-"` -} - -// zoneSettingSSLListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingSSLListResponseResult] -type zoneSettingSSLListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingSSLListResponseResultID string - -const ( - ZoneSettingSSLListResponseResultIDSSL ZoneSettingSSLListResponseResultID = "ssl" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingSSLListResponseResultEditable bool - -const ( - ZoneSettingSSLListResponseResultEditableTrue ZoneSettingSSLListResponseResultEditable = true - ZoneSettingSSLListResponseResultEditableFalse ZoneSettingSSLListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingSSLListResponseResultValue string - -const ( - ZoneSettingSSLListResponseResultValueOff ZoneSettingSSLListResponseResultValue = "off" - ZoneSettingSSLListResponseResultValueFlexible ZoneSettingSSLListResponseResultValue = "flexible" - ZoneSettingSSLListResponseResultValueFull ZoneSettingSSLListResponseResultValue = "full" - ZoneSettingSSLListResponseResultValueStrict ZoneSettingSSLListResponseResultValue = "strict" -) - -type ZoneSettingSSLUpdateParams struct { - // Value of the zone setting. Notes: Depends on the zone's plan level - Value param.Field[ZoneSettingSSLUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingSSLUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Depends on the zone's plan level -type ZoneSettingSSLUpdateParamsValue string - -const ( - ZoneSettingSSLUpdateParamsValueOff ZoneSettingSSLUpdateParamsValue = "off" - ZoneSettingSSLUpdateParamsValueFlexible ZoneSettingSSLUpdateParamsValue = "flexible" - ZoneSettingSSLUpdateParamsValueFull ZoneSettingSSLUpdateParamsValue = "full" - ZoneSettingSSLUpdateParamsValueStrict ZoneSettingSSLUpdateParamsValue = "strict" -) diff --git a/zonesettingssl_test.go b/zonesettingssl_test.go deleted file mode 100644 index 0737c225d69..00000000000 --- a/zonesettingssl_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingSSLUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SSLs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingSSLUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingSSLUpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingSSLList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SSLs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingsslrecommender.go b/zonesettingsslrecommender.go deleted file mode 100644 index c9593041a31..00000000000 --- a/zonesettingsslrecommender.go +++ /dev/null @@ -1,258 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingSSLRecommenderService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingSSLRecommenderService] method instead. -type ZoneSettingSSLRecommenderService struct { - Options []option.RequestOption -} - -// NewZoneSettingSSLRecommenderService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingSSLRecommenderService(opts ...option.RequestOption) (r *ZoneSettingSSLRecommenderService) { - r = &ZoneSettingSSLRecommenderService{} - r.Options = opts - return -} - -// Enrollment in the SSL/TLS Recommender service which tries to detect and -// recommend (by sending periodic emails) the most secure SSL/TLS setting your -// origin servers support. -func (r *ZoneSettingSSLRecommenderService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingSSLRecommenderUpdateParams, opts ...option.RequestOption) (res *ZoneSettingSSLRecommenderUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ssl_recommender", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Enrollment in the SSL/TLS Recommender service which tries to detect and -// recommend (by sending periodic emails) the most secure SSL/TLS setting your -// origin servers support. -func (r *ZoneSettingSSLRecommenderService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingSSLRecommenderListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/ssl_recommender", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingSSLRecommenderUpdateResponse struct { - Errors []ZoneSettingSSLRecommenderUpdateResponseError `json:"errors"` - Messages []ZoneSettingSSLRecommenderUpdateResponseMessage `json:"messages"` - Result ZoneSettingSSLRecommenderUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSSLRecommenderUpdateResponseJSON `json:"-"` -} - -// zoneSettingSSLRecommenderUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSSLRecommenderUpdateResponse] -type zoneSettingSSLRecommenderUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLRecommenderUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingSSLRecommenderUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingSSLRecommenderUpdateResponseError] -type zoneSettingSSLRecommenderUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLRecommenderUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingSSLRecommenderUpdateResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingSSLRecommenderUpdateResponseMessage] -type zoneSettingSSLRecommenderUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderUpdateResponseResult struct { - // Enrollment value for SSL/TLS Recommender. - ID ZoneSettingSSLRecommenderUpdateResponseResultID `json:"id"` - // ssl-recommender enrollment setting. - Enabled bool `json:"enabled"` - JSON zoneSettingSSLRecommenderUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingSSLRecommenderUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSSLRecommenderUpdateResponseResult] -type zoneSettingSSLRecommenderUpdateResponseResultJSON struct { - ID apijson.Field - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingSSLRecommenderUpdateResponseResultID string - -const ( - ZoneSettingSSLRecommenderUpdateResponseResultIDSSLRecommender ZoneSettingSSLRecommenderUpdateResponseResultID = "ssl_recommender" -) - -type ZoneSettingSSLRecommenderListResponse struct { - Errors []ZoneSettingSSLRecommenderListResponseError `json:"errors"` - Messages []ZoneSettingSSLRecommenderListResponseMessage `json:"messages"` - Result ZoneSettingSSLRecommenderListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingSSLRecommenderListResponseJSON `json:"-"` -} - -// zoneSettingSSLRecommenderListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingSSLRecommenderListResponse] -type zoneSettingSSLRecommenderListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLRecommenderListResponseErrorJSON `json:"-"` -} - -// zoneSettingSSLRecommenderListResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingSSLRecommenderListResponseError] -type zoneSettingSSLRecommenderListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingSSLRecommenderListResponseMessageJSON `json:"-"` -} - -// zoneSettingSSLRecommenderListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingSSLRecommenderListResponseMessage] -type zoneSettingSSLRecommenderListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingSSLRecommenderListResponseResult struct { - // Enrollment value for SSL/TLS Recommender. - ID ZoneSettingSSLRecommenderListResponseResultID `json:"id"` - // ssl-recommender enrollment setting. - Enabled bool `json:"enabled"` - JSON zoneSettingSSLRecommenderListResponseResultJSON `json:"-"` -} - -// zoneSettingSSLRecommenderListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingSSLRecommenderListResponseResult] -type zoneSettingSSLRecommenderListResponseResultJSON struct { - ID apijson.Field - Enabled apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingSSLRecommenderListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingSSLRecommenderListResponseResultID string - -const ( - ZoneSettingSSLRecommenderListResponseResultIDSSLRecommender ZoneSettingSSLRecommenderListResponseResultID = "ssl_recommender" -) - -type ZoneSettingSSLRecommenderUpdateParams struct { - Value param.Field[ZoneSettingSSLRecommenderUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingSSLRecommenderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ZoneSettingSSLRecommenderUpdateParamsValue struct { - // Enrollment value for SSL/TLS Recommender. - ID param.Field[ZoneSettingSSLRecommenderUpdateParamsValueID] `json:"id"` - // ssl-recommender enrollment setting. - Enabled param.Field[bool] `json:"enabled"` -} - -func (r ZoneSettingSSLRecommenderUpdateParamsValue) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Enrollment value for SSL/TLS Recommender. -type ZoneSettingSSLRecommenderUpdateParamsValueID string - -const ( - ZoneSettingSSLRecommenderUpdateParamsValueIDSSLRecommender ZoneSettingSSLRecommenderUpdateParamsValueID = "ssl_recommender" -) diff --git a/zonesettingsslrecommender_test.go b/zonesettingsslrecommender_test.go deleted file mode 100644 index 467ee5bfec2..00000000000 --- a/zonesettingsslrecommender_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingSSLRecommenderUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SSLRecommenders.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingSSLRecommenderUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingSSLRecommenderUpdateParamsValue{ - Enabled: cloudflare.F(true), - ID: cloudflare.F(cloudflare.ZoneSettingSSLRecommenderUpdateParamsValueIDSSLRecommender), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingSSLRecommenderList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.SSLRecommenders.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingtls13.go b/zonesettingtls13.go deleted file mode 100644 index e4622bb5f86..00000000000 --- a/zonesettingtls13.go +++ /dev/null @@ -1,307 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingTLS1_3Service contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingTLS1_3Service] method -// instead. -type ZoneSettingTLS1_3Service struct { - Options []option.RequestOption -} - -// NewZoneSettingTLS1_3Service generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingTLS1_3Service(opts ...option.RequestOption) (r *ZoneSettingTLS1_3Service) { - r = &ZoneSettingTLS1_3Service{} - r.Options = opts - return -} - -// Changes TLS 1.3 setting. -func (r *ZoneSettingTLS1_3Service) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingTLS1_3UpdateParams, opts ...option.RequestOption) (res *ZoneSettingTls1_3UpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/tls_1_3", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets TLS 1.3 setting enabled for a zone. -func (r *ZoneSettingTLS1_3Service) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingTls1_3ListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/tls_1_3", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingTls1_3UpdateResponse struct { - Errors []ZoneSettingTls1_3UpdateResponseError `json:"errors"` - Messages []ZoneSettingTls1_3UpdateResponseMessage `json:"messages"` - // Enables Crypto TLS 1.3 feature for a zone. - Result ZoneSettingTls1_3UpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTls1_3UpdateResponseJSON `json:"-"` -} - -// zoneSettingTls1_3UpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingTls1_3UpdateResponse] -type zoneSettingTls1_3UpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3UpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTls1_3UpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTls1_3UpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingTls1_3UpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingTls1_3UpdateResponseError] -type zoneSettingTls1_3UpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3UpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTls1_3UpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTls1_3UpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingTls1_3UpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingTls1_3UpdateResponseMessage] -type zoneSettingTls1_3UpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3UpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables Crypto TLS 1.3 feature for a zone. -type ZoneSettingTls1_3UpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTls1_3UpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTls1_3UpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingTls1_3UpdateResponseResultValue `json:"value"` - JSON zoneSettingTls1_3UpdateResponseResultJSON `json:"-"` -} - -// zoneSettingTls1_3UpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingTls1_3UpdateResponseResult] -type zoneSettingTls1_3UpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3UpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTls1_3UpdateResponseResultID string - -const ( - ZoneSettingTls1_3UpdateResponseResultIDTLS1_3 ZoneSettingTls1_3UpdateResponseResultID = "tls_1_3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTls1_3UpdateResponseResultEditable bool - -const ( - ZoneSettingTls1_3UpdateResponseResultEditableTrue ZoneSettingTls1_3UpdateResponseResultEditable = true - ZoneSettingTls1_3UpdateResponseResultEditableFalse ZoneSettingTls1_3UpdateResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingTls1_3UpdateResponseResultValue string - -const ( - ZoneSettingTls1_3UpdateResponseResultValueOn ZoneSettingTls1_3UpdateResponseResultValue = "on" - ZoneSettingTls1_3UpdateResponseResultValueOff ZoneSettingTls1_3UpdateResponseResultValue = "off" - ZoneSettingTls1_3UpdateResponseResultValueZrt ZoneSettingTls1_3UpdateResponseResultValue = "zrt" -) - -type ZoneSettingTls1_3ListResponse struct { - Errors []ZoneSettingTls1_3ListResponseError `json:"errors"` - Messages []ZoneSettingTls1_3ListResponseMessage `json:"messages"` - // Enables Crypto TLS 1.3 feature for a zone. - Result ZoneSettingTls1_3ListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTls1_3ListResponseJSON `json:"-"` -} - -// zoneSettingTls1_3ListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingTls1_3ListResponse] -type zoneSettingTls1_3ListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3ListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTls1_3ListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTls1_3ListResponseErrorJSON `json:"-"` -} - -// zoneSettingTls1_3ListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingTls1_3ListResponseError] -type zoneSettingTls1_3ListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3ListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTls1_3ListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTls1_3ListResponseMessageJSON `json:"-"` -} - -// zoneSettingTls1_3ListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingTls1_3ListResponseMessage] -type zoneSettingTls1_3ListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3ListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Enables Crypto TLS 1.3 feature for a zone. -type ZoneSettingTls1_3ListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTls1_3ListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTls1_3ListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value ZoneSettingTls1_3ListResponseResultValue `json:"value"` - JSON zoneSettingTls1_3ListResponseResultJSON `json:"-"` -} - -// zoneSettingTls1_3ListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingTls1_3ListResponseResult] -type zoneSettingTls1_3ListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTls1_3ListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTls1_3ListResponseResultID string - -const ( - ZoneSettingTls1_3ListResponseResultIDTLS1_3 ZoneSettingTls1_3ListResponseResultID = "tls_1_3" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTls1_3ListResponseResultEditable bool - -const ( - ZoneSettingTls1_3ListResponseResultEditableTrue ZoneSettingTls1_3ListResponseResultEditable = true - ZoneSettingTls1_3ListResponseResultEditableFalse ZoneSettingTls1_3ListResponseResultEditable = false -) - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingTls1_3ListResponseResultValue string - -const ( - ZoneSettingTls1_3ListResponseResultValueOn ZoneSettingTls1_3ListResponseResultValue = "on" - ZoneSettingTls1_3ListResponseResultValueOff ZoneSettingTls1_3ListResponseResultValue = "off" - ZoneSettingTls1_3ListResponseResultValueZrt ZoneSettingTls1_3ListResponseResultValue = "zrt" -) - -type ZoneSettingTLS1_3UpdateParams struct { - // Value of the zone setting. Notes: Default value depends on the zone's plan - // level. - Value param.Field[ZoneSettingTls1_3UpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingTLS1_3UpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. Notes: Default value depends on the zone's plan -// level. -type ZoneSettingTls1_3UpdateParamsValue string - -const ( - ZoneSettingTls1_3UpdateParamsValueOn ZoneSettingTls1_3UpdateParamsValue = "on" - ZoneSettingTls1_3UpdateParamsValueOff ZoneSettingTls1_3UpdateParamsValue = "off" - ZoneSettingTls1_3UpdateParamsValueZrt ZoneSettingTls1_3UpdateParamsValue = "zrt" -) diff --git a/zonesettingtls13_test.go b/zonesettingtls13_test.go deleted file mode 100644 index de62c1b05eb..00000000000 --- a/zonesettingtls13_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingTLS1_3Update(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TLS1_3s.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingTLS1_3UpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingTls1_3UpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingTLS1_3List(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TLS1_3s.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingtlsclientauth.go b/zonesettingtlsclientauth.go deleted file mode 100644 index 0ecff541b4d..00000000000 --- a/zonesettingtlsclientauth.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingTLSClientAuthService contains methods and other services that help -// with interacting with the cloudflare API. Note, unlike clients, this service -// does not read variables from the environment automatically. You should not -// instantiate this service directly, and instead use the -// [NewZoneSettingTLSClientAuthService] method instead. -type ZoneSettingTLSClientAuthService struct { - Options []option.RequestOption -} - -// NewZoneSettingTLSClientAuthService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingTLSClientAuthService(opts ...option.RequestOption) (r *ZoneSettingTLSClientAuthService) { - r = &ZoneSettingTLSClientAuthService{} - r.Options = opts - return -} - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -func (r *ZoneSettingTLSClientAuthService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingTLSClientAuthUpdateParams, opts ...option.RequestOption) (res *ZoneSettingTLSClientAuthUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/tls_client_auth", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -func (r *ZoneSettingTLSClientAuthService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingTLSClientAuthListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/tls_client_auth", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingTLSClientAuthUpdateResponse struct { - Errors []ZoneSettingTLSClientAuthUpdateResponseError `json:"errors"` - Messages []ZoneSettingTLSClientAuthUpdateResponseMessage `json:"messages"` - // TLS Client Auth requires Cloudflare to connect to your origin server using a - // client certificate (Enterprise Only). - Result ZoneSettingTLSClientAuthUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTLSClientAuthUpdateResponseJSON `json:"-"` -} - -// zoneSettingTLSClientAuthUpdateResponseJSON contains the JSON metadata for the -// struct [ZoneSettingTLSClientAuthUpdateResponse] -type zoneSettingTLSClientAuthUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTLSClientAuthUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTLSClientAuthUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingTLSClientAuthUpdateResponseErrorJSON contains the JSON metadata for -// the struct [ZoneSettingTLSClientAuthUpdateResponseError] -type zoneSettingTLSClientAuthUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTLSClientAuthUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTLSClientAuthUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingTLSClientAuthUpdateResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingTLSClientAuthUpdateResponseMessage] -type zoneSettingTLSClientAuthUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -type ZoneSettingTLSClientAuthUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTLSClientAuthUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTLSClientAuthUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // value of the zone setting. - Value ZoneSettingTLSClientAuthUpdateResponseResultValue `json:"value"` - JSON zoneSettingTLSClientAuthUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingTLSClientAuthUpdateResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingTLSClientAuthUpdateResponseResult] -type zoneSettingTLSClientAuthUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTLSClientAuthUpdateResponseResultID string - -const ( - ZoneSettingTLSClientAuthUpdateResponseResultIDTLSClientAuth ZoneSettingTLSClientAuthUpdateResponseResultID = "tls_client_auth" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTLSClientAuthUpdateResponseResultEditable bool - -const ( - ZoneSettingTLSClientAuthUpdateResponseResultEditableTrue ZoneSettingTLSClientAuthUpdateResponseResultEditable = true - ZoneSettingTLSClientAuthUpdateResponseResultEditableFalse ZoneSettingTLSClientAuthUpdateResponseResultEditable = false -) - -// value of the zone setting. -type ZoneSettingTLSClientAuthUpdateResponseResultValue string - -const ( - ZoneSettingTLSClientAuthUpdateResponseResultValueOn ZoneSettingTLSClientAuthUpdateResponseResultValue = "on" - ZoneSettingTLSClientAuthUpdateResponseResultValueOff ZoneSettingTLSClientAuthUpdateResponseResultValue = "off" -) - -type ZoneSettingTLSClientAuthListResponse struct { - Errors []ZoneSettingTLSClientAuthListResponseError `json:"errors"` - Messages []ZoneSettingTLSClientAuthListResponseMessage `json:"messages"` - // TLS Client Auth requires Cloudflare to connect to your origin server using a - // client certificate (Enterprise Only). - Result ZoneSettingTLSClientAuthListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTLSClientAuthListResponseJSON `json:"-"` -} - -// zoneSettingTLSClientAuthListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingTLSClientAuthListResponse] -type zoneSettingTLSClientAuthListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTLSClientAuthListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTLSClientAuthListResponseErrorJSON `json:"-"` -} - -// zoneSettingTLSClientAuthListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingTLSClientAuthListResponseError] -type zoneSettingTLSClientAuthListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTLSClientAuthListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTLSClientAuthListResponseMessageJSON `json:"-"` -} - -// zoneSettingTLSClientAuthListResponseMessageJSON contains the JSON metadata for -// the struct [ZoneSettingTLSClientAuthListResponseMessage] -type zoneSettingTLSClientAuthListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// TLS Client Auth requires Cloudflare to connect to your origin server using a -// client certificate (Enterprise Only). -type ZoneSettingTLSClientAuthListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTLSClientAuthListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTLSClientAuthListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // value of the zone setting. - Value ZoneSettingTLSClientAuthListResponseResultValue `json:"value"` - JSON zoneSettingTLSClientAuthListResponseResultJSON `json:"-"` -} - -// zoneSettingTLSClientAuthListResponseResultJSON contains the JSON metadata for -// the struct [ZoneSettingTLSClientAuthListResponseResult] -type zoneSettingTLSClientAuthListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTLSClientAuthListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTLSClientAuthListResponseResultID string - -const ( - ZoneSettingTLSClientAuthListResponseResultIDTLSClientAuth ZoneSettingTLSClientAuthListResponseResultID = "tls_client_auth" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTLSClientAuthListResponseResultEditable bool - -const ( - ZoneSettingTLSClientAuthListResponseResultEditableTrue ZoneSettingTLSClientAuthListResponseResultEditable = true - ZoneSettingTLSClientAuthListResponseResultEditableFalse ZoneSettingTLSClientAuthListResponseResultEditable = false -) - -// value of the zone setting. -type ZoneSettingTLSClientAuthListResponseResultValue string - -const ( - ZoneSettingTLSClientAuthListResponseResultValueOn ZoneSettingTLSClientAuthListResponseResultValue = "on" - ZoneSettingTLSClientAuthListResponseResultValueOff ZoneSettingTLSClientAuthListResponseResultValue = "off" -) - -type ZoneSettingTLSClientAuthUpdateParams struct { - // value of the zone setting. - Value param.Field[ZoneSettingTLSClientAuthUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingTLSClientAuthUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// value of the zone setting. -type ZoneSettingTLSClientAuthUpdateParamsValue string - -const ( - ZoneSettingTLSClientAuthUpdateParamsValueOn ZoneSettingTLSClientAuthUpdateParamsValue = "on" - ZoneSettingTLSClientAuthUpdateParamsValueOff ZoneSettingTLSClientAuthUpdateParamsValue = "off" -) diff --git a/zonesettingtlsclientauth_test.go b/zonesettingtlsclientauth_test.go deleted file mode 100644 index b095e73c26c..00000000000 --- a/zonesettingtlsclientauth_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingTLSClientAuthUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TLSClientAuths.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingTLSClientAuthUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingTLSClientAuthUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingTLSClientAuthList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TLSClientAuths.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingtrueclientipheader.go b/zonesettingtrueclientipheader.go deleted file mode 100644 index 4f19b57387f..00000000000 --- a/zonesettingtrueclientipheader.go +++ /dev/null @@ -1,304 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingTrueClientIPHeaderService contains methods and other services that -// help with interacting with the cloudflare API. Note, unlike clients, this -// service does not read variables from the environment automatically. You should -// not instantiate this service directly, and instead use the -// [NewZoneSettingTrueClientIPHeaderService] method instead. -type ZoneSettingTrueClientIPHeaderService struct { - Options []option.RequestOption -} - -// NewZoneSettingTrueClientIPHeaderService generates a new service that applies the -// given options to each request. These options are applied after the parent -// client's options (if there is one), and before any request-specific options. -func NewZoneSettingTrueClientIPHeaderService(opts ...option.RequestOption) (r *ZoneSettingTrueClientIPHeaderService) { - r = &ZoneSettingTrueClientIPHeaderService{} - r.Options = opts - return -} - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -func (r *ZoneSettingTrueClientIPHeaderService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingTrueClientIPHeaderUpdateParams, opts ...option.RequestOption) (res *ZoneSettingTrueClientIPHeaderUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/true_client_ip_header", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -func (r *ZoneSettingTrueClientIPHeaderService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingTrueClientIPHeaderListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/true_client_ip_header", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingTrueClientIPHeaderUpdateResponse struct { - Errors []ZoneSettingTrueClientIPHeaderUpdateResponseError `json:"errors"` - Messages []ZoneSettingTrueClientIPHeaderUpdateResponseMessage `json:"messages"` - // Allows customer to continue to use True Client IP (Akamai feature) in the - // headers we send to the origin. This is limited to Enterprise Zones. - Result ZoneSettingTrueClientIPHeaderUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTrueClientIPHeaderUpdateResponseJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderUpdateResponseJSON contains the JSON metadata for -// the struct [ZoneSettingTrueClientIPHeaderUpdateResponse] -type zoneSettingTrueClientIPHeaderUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTrueClientIPHeaderUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTrueClientIPHeaderUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderUpdateResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingTrueClientIPHeaderUpdateResponseError] -type zoneSettingTrueClientIPHeaderUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTrueClientIPHeaderUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTrueClientIPHeaderUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderUpdateResponseMessageJSON contains the JSON -// metadata for the struct [ZoneSettingTrueClientIPHeaderUpdateResponseMessage] -type zoneSettingTrueClientIPHeaderUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -type ZoneSettingTrueClientIPHeaderUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTrueClientIPHeaderUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTrueClientIPHeaderUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingTrueClientIPHeaderUpdateResponseResultValue `json:"value"` - JSON zoneSettingTrueClientIPHeaderUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderUpdateResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingTrueClientIPHeaderUpdateResponseResult] -type zoneSettingTrueClientIPHeaderUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTrueClientIPHeaderUpdateResponseResultID string - -const ( - ZoneSettingTrueClientIPHeaderUpdateResponseResultIDTrueClientIPHeader ZoneSettingTrueClientIPHeaderUpdateResponseResultID = "true_client_ip_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTrueClientIPHeaderUpdateResponseResultEditable bool - -const ( - ZoneSettingTrueClientIPHeaderUpdateResponseResultEditableTrue ZoneSettingTrueClientIPHeaderUpdateResponseResultEditable = true - ZoneSettingTrueClientIPHeaderUpdateResponseResultEditableFalse ZoneSettingTrueClientIPHeaderUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingTrueClientIPHeaderUpdateResponseResultValue string - -const ( - ZoneSettingTrueClientIPHeaderUpdateResponseResultValueOn ZoneSettingTrueClientIPHeaderUpdateResponseResultValue = "on" - ZoneSettingTrueClientIPHeaderUpdateResponseResultValueOff ZoneSettingTrueClientIPHeaderUpdateResponseResultValue = "off" -) - -type ZoneSettingTrueClientIPHeaderListResponse struct { - Errors []ZoneSettingTrueClientIPHeaderListResponseError `json:"errors"` - Messages []ZoneSettingTrueClientIPHeaderListResponseMessage `json:"messages"` - // Allows customer to continue to use True Client IP (Akamai feature) in the - // headers we send to the origin. This is limited to Enterprise Zones. - Result ZoneSettingTrueClientIPHeaderListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingTrueClientIPHeaderListResponseJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderListResponseJSON contains the JSON metadata for the -// struct [ZoneSettingTrueClientIPHeaderListResponse] -type zoneSettingTrueClientIPHeaderListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTrueClientIPHeaderListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTrueClientIPHeaderListResponseErrorJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderListResponseErrorJSON contains the JSON metadata -// for the struct [ZoneSettingTrueClientIPHeaderListResponseError] -type zoneSettingTrueClientIPHeaderListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingTrueClientIPHeaderListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingTrueClientIPHeaderListResponseMessageJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderListResponseMessageJSON contains the JSON metadata -// for the struct [ZoneSettingTrueClientIPHeaderListResponseMessage] -type zoneSettingTrueClientIPHeaderListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Allows customer to continue to use True Client IP (Akamai feature) in the -// headers we send to the origin. This is limited to Enterprise Zones. -type ZoneSettingTrueClientIPHeaderListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingTrueClientIPHeaderListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingTrueClientIPHeaderListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingTrueClientIPHeaderListResponseResultValue `json:"value"` - JSON zoneSettingTrueClientIPHeaderListResponseResultJSON `json:"-"` -} - -// zoneSettingTrueClientIPHeaderListResponseResultJSON contains the JSON metadata -// for the struct [ZoneSettingTrueClientIPHeaderListResponseResult] -type zoneSettingTrueClientIPHeaderListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingTrueClientIPHeaderListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingTrueClientIPHeaderListResponseResultID string - -const ( - ZoneSettingTrueClientIPHeaderListResponseResultIDTrueClientIPHeader ZoneSettingTrueClientIPHeaderListResponseResultID = "true_client_ip_header" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingTrueClientIPHeaderListResponseResultEditable bool - -const ( - ZoneSettingTrueClientIPHeaderListResponseResultEditableTrue ZoneSettingTrueClientIPHeaderListResponseResultEditable = true - ZoneSettingTrueClientIPHeaderListResponseResultEditableFalse ZoneSettingTrueClientIPHeaderListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingTrueClientIPHeaderListResponseResultValue string - -const ( - ZoneSettingTrueClientIPHeaderListResponseResultValueOn ZoneSettingTrueClientIPHeaderListResponseResultValue = "on" - ZoneSettingTrueClientIPHeaderListResponseResultValueOff ZoneSettingTrueClientIPHeaderListResponseResultValue = "off" -) - -type ZoneSettingTrueClientIPHeaderUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingTrueClientIPHeaderUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingTrueClientIPHeaderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingTrueClientIPHeaderUpdateParamsValue string - -const ( - ZoneSettingTrueClientIPHeaderUpdateParamsValueOn ZoneSettingTrueClientIPHeaderUpdateParamsValue = "on" - ZoneSettingTrueClientIPHeaderUpdateParamsValueOff ZoneSettingTrueClientIPHeaderUpdateParamsValue = "off" -) diff --git a/zonesettingtrueclientipheader_test.go b/zonesettingtrueclientipheader_test.go deleted file mode 100644 index 0151a499bdf..00000000000 --- a/zonesettingtrueclientipheader_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingTrueClientIPHeaderUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TrueClientIPHeaders.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingTrueClientIPHeaderUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingTrueClientIPHeaderUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingTrueClientIPHeaderList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.TrueClientIPHeaders.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingwaf.go b/zonesettingwaf.go deleted file mode 100644 index 5cf53e7eb40..00000000000 --- a/zonesettingwaf.go +++ /dev/null @@ -1,352 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingWAFService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingWAFService] method -// instead. -type ZoneSettingWAFService struct { - Options []option.RequestOption -} - -// NewZoneSettingWAFService generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingWAFService(opts ...option.RequestOption) (r *ZoneSettingWAFService) { - r = &ZoneSettingWAFService{} - r.Options = opts - return -} - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -func (r *ZoneSettingWAFService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingWAFUpdateParams, opts ...option.RequestOption) (res *ZoneSettingWAFUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/waf", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -func (r *ZoneSettingWAFService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingWAFListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/waf", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingWAFUpdateResponse struct { - Errors []ZoneSettingWAFUpdateResponseError `json:"errors"` - Messages []ZoneSettingWAFUpdateResponseMessage `json:"messages"` - // The WAF examines HTTP requests to your website. It inspects both GET and POST - // requests and applies rules to help filter out illegitimate traffic from - // legitimate website visitors. The Cloudflare WAF inspects website addresses or - // URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - // suspicious user behavior, then the WAF will 'challenge' the web visitor with a - // page that asks them to submit a CAPTCHA successfully to continue their action. - // If the challenge is failed, the action will be stopped. What this means is that - // Cloudflare's WAF will block any traffic identified as illegitimate before it - // reaches your origin web server. - // (https://support.cloudflare.com/hc/en-us/articles/200172016). - Result ZoneSettingWAFUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWAFUpdateResponseJSON `json:"-"` -} - -// zoneSettingWAFUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWAFUpdateResponse] -type zoneSettingWAFUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWAFUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWAFUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingWAFUpdateResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingWAFUpdateResponseError] -type zoneSettingWAFUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWAFUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWAFUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingWAFUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingWAFUpdateResponseMessage] -type zoneSettingWAFUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -type ZoneSettingWAFUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWAFUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWAFUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWAFUpdateResponseResultValue `json:"value"` - JSON zoneSettingWAFUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingWAFUpdateResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingWAFUpdateResponseResult] -type zoneSettingWAFUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWAFUpdateResponseResultID string - -const ( - ZoneSettingWAFUpdateResponseResultIDWAF ZoneSettingWAFUpdateResponseResultID = "waf" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWAFUpdateResponseResultEditable bool - -const ( - ZoneSettingWAFUpdateResponseResultEditableTrue ZoneSettingWAFUpdateResponseResultEditable = true - ZoneSettingWAFUpdateResponseResultEditableFalse ZoneSettingWAFUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWAFUpdateResponseResultValue string - -const ( - ZoneSettingWAFUpdateResponseResultValueOn ZoneSettingWAFUpdateResponseResultValue = "on" - ZoneSettingWAFUpdateResponseResultValueOff ZoneSettingWAFUpdateResponseResultValue = "off" -) - -type ZoneSettingWAFListResponse struct { - Errors []ZoneSettingWAFListResponseError `json:"errors"` - Messages []ZoneSettingWAFListResponseMessage `json:"messages"` - // The WAF examines HTTP requests to your website. It inspects both GET and POST - // requests and applies rules to help filter out illegitimate traffic from - // legitimate website visitors. The Cloudflare WAF inspects website addresses or - // URLs to detect anything out of the ordinary. If the Cloudflare WAF determines - // suspicious user behavior, then the WAF will 'challenge' the web visitor with a - // page that asks them to submit a CAPTCHA successfully to continue their action. - // If the challenge is failed, the action will be stopped. What this means is that - // Cloudflare's WAF will block any traffic identified as illegitimate before it - // reaches your origin web server. - // (https://support.cloudflare.com/hc/en-us/articles/200172016). - Result ZoneSettingWAFListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWAFListResponseJSON `json:"-"` -} - -// zoneSettingWAFListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWAFListResponse] -type zoneSettingWAFListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWAFListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWAFListResponseErrorJSON `json:"-"` -} - -// zoneSettingWAFListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingWAFListResponseError] -type zoneSettingWAFListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWAFListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWAFListResponseMessageJSON `json:"-"` -} - -// zoneSettingWAFListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingWAFListResponseMessage] -type zoneSettingWAFListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// The WAF examines HTTP requests to your website. It inspects both GET and POST -// requests and applies rules to help filter out illegitimate traffic from -// legitimate website visitors. The Cloudflare WAF inspects website addresses or -// URLs to detect anything out of the ordinary. If the Cloudflare WAF determines -// suspicious user behavior, then the WAF will 'challenge' the web visitor with a -// page that asks them to submit a CAPTCHA successfully to continue their action. -// If the challenge is failed, the action will be stopped. What this means is that -// Cloudflare's WAF will block any traffic identified as illegitimate before it -// reaches your origin web server. -// (https://support.cloudflare.com/hc/en-us/articles/200172016). -type ZoneSettingWAFListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWAFListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWAFListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWAFListResponseResultValue `json:"value"` - JSON zoneSettingWAFListResponseResultJSON `json:"-"` -} - -// zoneSettingWAFListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingWAFListResponseResult] -type zoneSettingWAFListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWAFListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWAFListResponseResultID string - -const ( - ZoneSettingWAFListResponseResultIDWAF ZoneSettingWAFListResponseResultID = "waf" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWAFListResponseResultEditable bool - -const ( - ZoneSettingWAFListResponseResultEditableTrue ZoneSettingWAFListResponseResultEditable = true - ZoneSettingWAFListResponseResultEditableFalse ZoneSettingWAFListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWAFListResponseResultValue string - -const ( - ZoneSettingWAFListResponseResultValueOn ZoneSettingWAFListResponseResultValue = "on" - ZoneSettingWAFListResponseResultValueOff ZoneSettingWAFListResponseResultValue = "off" -) - -type ZoneSettingWAFUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingWAFUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingWAFUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingWAFUpdateParamsValue string - -const ( - ZoneSettingWAFUpdateParamsValueOn ZoneSettingWAFUpdateParamsValue = "on" - ZoneSettingWAFUpdateParamsValueOff ZoneSettingWAFUpdateParamsValue = "off" -) diff --git a/zonesettingwaf_test.go b/zonesettingwaf_test.go deleted file mode 100644 index 8961dbf4d0c..00000000000 --- a/zonesettingwaf_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingWAFUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.WAFs.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingWAFUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingWAFUpdateParamsValueOn), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingWAFList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.WAFs.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingwebp.go b/zonesettingwebp.go deleted file mode 100644 index 498265d4635..00000000000 --- a/zonesettingwebp.go +++ /dev/null @@ -1,310 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingWebpService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingWebpService] method -// instead. -type ZoneSettingWebpService struct { - Options []option.RequestOption -} - -// NewZoneSettingWebpService generates a new service that applies the given options -// to each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewZoneSettingWebpService(opts ...option.RequestOption) (r *ZoneSettingWebpService) { - r = &ZoneSettingWebpService{} - r.Options = opts - return -} - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -func (r *ZoneSettingWebpService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingWebpUpdateParams, opts ...option.RequestOption) (res *ZoneSettingWebpUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/webp", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -func (r *ZoneSettingWebpService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingWebpListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/webp", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingWebpUpdateResponse struct { - Errors []ZoneSettingWebpUpdateResponseError `json:"errors"` - Messages []ZoneSettingWebpUpdateResponseMessage `json:"messages"` - // When the client requesting the image supports the WebP image codec, and WebP - // offers a performance advantage over the original image format, Cloudflare will - // serve a WebP version of the original image. - Result ZoneSettingWebpUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWebpUpdateResponseJSON `json:"-"` -} - -// zoneSettingWebpUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWebpUpdateResponse] -type zoneSettingWebpUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebpUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebpUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingWebpUpdateResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingWebpUpdateResponseError] -type zoneSettingWebpUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebpUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebpUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingWebpUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingWebpUpdateResponseMessage] -type zoneSettingWebpUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -type ZoneSettingWebpUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWebpUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWebpUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWebpUpdateResponseResultValue `json:"value"` - JSON zoneSettingWebpUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingWebpUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingWebpUpdateResponseResult] -type zoneSettingWebpUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWebpUpdateResponseResultID string - -const ( - ZoneSettingWebpUpdateResponseResultIDWebp ZoneSettingWebpUpdateResponseResultID = "webp" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWebpUpdateResponseResultEditable bool - -const ( - ZoneSettingWebpUpdateResponseResultEditableTrue ZoneSettingWebpUpdateResponseResultEditable = true - ZoneSettingWebpUpdateResponseResultEditableFalse ZoneSettingWebpUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWebpUpdateResponseResultValue string - -const ( - ZoneSettingWebpUpdateResponseResultValueOff ZoneSettingWebpUpdateResponseResultValue = "off" - ZoneSettingWebpUpdateResponseResultValueOn ZoneSettingWebpUpdateResponseResultValue = "on" -) - -type ZoneSettingWebpListResponse struct { - Errors []ZoneSettingWebpListResponseError `json:"errors"` - Messages []ZoneSettingWebpListResponseMessage `json:"messages"` - // When the client requesting the image supports the WebP image codec, and WebP - // offers a performance advantage over the original image format, Cloudflare will - // serve a WebP version of the original image. - Result ZoneSettingWebpListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWebpListResponseJSON `json:"-"` -} - -// zoneSettingWebpListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWebpListResponse] -type zoneSettingWebpListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebpListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebpListResponseErrorJSON `json:"-"` -} - -// zoneSettingWebpListResponseErrorJSON contains the JSON metadata for the struct -// [ZoneSettingWebpListResponseError] -type zoneSettingWebpListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebpListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebpListResponseMessageJSON `json:"-"` -} - -// zoneSettingWebpListResponseMessageJSON contains the JSON metadata for the struct -// [ZoneSettingWebpListResponseMessage] -type zoneSettingWebpListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// When the client requesting the image supports the WebP image codec, and WebP -// offers a performance advantage over the original image format, Cloudflare will -// serve a WebP version of the original image. -type ZoneSettingWebpListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWebpListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWebpListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWebpListResponseResultValue `json:"value"` - JSON zoneSettingWebpListResponseResultJSON `json:"-"` -} - -// zoneSettingWebpListResponseResultJSON contains the JSON metadata for the struct -// [ZoneSettingWebpListResponseResult] -type zoneSettingWebpListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebpListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWebpListResponseResultID string - -const ( - ZoneSettingWebpListResponseResultIDWebp ZoneSettingWebpListResponseResultID = "webp" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWebpListResponseResultEditable bool - -const ( - ZoneSettingWebpListResponseResultEditableTrue ZoneSettingWebpListResponseResultEditable = true - ZoneSettingWebpListResponseResultEditableFalse ZoneSettingWebpListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWebpListResponseResultValue string - -const ( - ZoneSettingWebpListResponseResultValueOff ZoneSettingWebpListResponseResultValue = "off" - ZoneSettingWebpListResponseResultValueOn ZoneSettingWebpListResponseResultValue = "on" -) - -type ZoneSettingWebpUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingWebpUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingWebpUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingWebpUpdateParamsValue string - -const ( - ZoneSettingWebpUpdateParamsValueOff ZoneSettingWebpUpdateParamsValue = "off" - ZoneSettingWebpUpdateParamsValueOn ZoneSettingWebpUpdateParamsValue = "on" -) diff --git a/zonesettingwebp_test.go b/zonesettingwebp_test.go deleted file mode 100644 index 772df1f0e0c..00000000000 --- a/zonesettingwebp_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingWebpUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Webps.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingWebpUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingWebpUpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingWebpList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Webps.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/zonesettingwebsocket.go b/zonesettingwebsocket.go deleted file mode 100644 index f5217826b05..00000000000 --- a/zonesettingwebsocket.go +++ /dev/null @@ -1,325 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/cloudflare/cloudflare-sdk-go/internal/apijson" - "github.com/cloudflare/cloudflare-sdk-go/internal/param" - "github.com/cloudflare/cloudflare-sdk-go/internal/requestconfig" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -// ZoneSettingWebsocketService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewZoneSettingWebsocketService] -// method instead. -type ZoneSettingWebsocketService struct { - Options []option.RequestOption -} - -// NewZoneSettingWebsocketService generates a new service that applies the given -// options to each request. These options are applied after the parent client's -// options (if there is one), and before any request-specific options. -func NewZoneSettingWebsocketService(opts ...option.RequestOption) (r *ZoneSettingWebsocketService) { - r = &ZoneSettingWebsocketService{} - r.Options = opts - return -} - -// Changes Websockets setting. For more information about Websockets, please refer -// to -// [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). -func (r *ZoneSettingWebsocketService) Update(ctx context.Context, zoneIdentifier string, body ZoneSettingWebsocketUpdateParams, opts ...option.RequestOption) (res *ZoneSettingWebsocketUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/websockets", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &res, opts...) - return -} - -// Gets Websockets setting. For more information about Websockets, please refer to -// [Using Cloudflare with WebSockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Using-Cloudflare-with-WebSockets). -func (r *ZoneSettingWebsocketService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ZoneSettingWebsocketListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/settings/websockets", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} - -type ZoneSettingWebsocketUpdateResponse struct { - Errors []ZoneSettingWebsocketUpdateResponseError `json:"errors"` - Messages []ZoneSettingWebsocketUpdateResponseMessage `json:"messages"` - // WebSockets are open connections sustained between the client and the origin - // server. Inside a WebSockets connection, the client and the origin can pass data - // back and forth without having to reestablish sessions. This makes exchanging - // data within a WebSockets connection fast. WebSockets are often used for - // real-time applications such as live chat and gaming. For more information refer - // to - // [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). - Result ZoneSettingWebsocketUpdateResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWebsocketUpdateResponseJSON `json:"-"` -} - -// zoneSettingWebsocketUpdateResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWebsocketUpdateResponse] -type zoneSettingWebsocketUpdateResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebsocketUpdateResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebsocketUpdateResponseErrorJSON `json:"-"` -} - -// zoneSettingWebsocketUpdateResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketUpdateResponseError] -type zoneSettingWebsocketUpdateResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketUpdateResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebsocketUpdateResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebsocketUpdateResponseMessageJSON `json:"-"` -} - -// zoneSettingWebsocketUpdateResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketUpdateResponseMessage] -type zoneSettingWebsocketUpdateResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketUpdateResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// WebSockets are open connections sustained between the client and the origin -// server. Inside a WebSockets connection, the client and the origin can pass data -// back and forth without having to reestablish sessions. This makes exchanging -// data within a WebSockets connection fast. WebSockets are often used for -// real-time applications such as live chat and gaming. For more information refer -// to -// [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). -type ZoneSettingWebsocketUpdateResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWebsocketUpdateResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWebsocketUpdateResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWebsocketUpdateResponseResultValue `json:"value"` - JSON zoneSettingWebsocketUpdateResponseResultJSON `json:"-"` -} - -// zoneSettingWebsocketUpdateResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketUpdateResponseResult] -type zoneSettingWebsocketUpdateResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketUpdateResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWebsocketUpdateResponseResultID string - -const ( - ZoneSettingWebsocketUpdateResponseResultIDWebsockets ZoneSettingWebsocketUpdateResponseResultID = "websockets" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWebsocketUpdateResponseResultEditable bool - -const ( - ZoneSettingWebsocketUpdateResponseResultEditableTrue ZoneSettingWebsocketUpdateResponseResultEditable = true - ZoneSettingWebsocketUpdateResponseResultEditableFalse ZoneSettingWebsocketUpdateResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWebsocketUpdateResponseResultValue string - -const ( - ZoneSettingWebsocketUpdateResponseResultValueOff ZoneSettingWebsocketUpdateResponseResultValue = "off" - ZoneSettingWebsocketUpdateResponseResultValueOn ZoneSettingWebsocketUpdateResponseResultValue = "on" -) - -type ZoneSettingWebsocketListResponse struct { - Errors []ZoneSettingWebsocketListResponseError `json:"errors"` - Messages []ZoneSettingWebsocketListResponseMessage `json:"messages"` - // WebSockets are open connections sustained between the client and the origin - // server. Inside a WebSockets connection, the client and the origin can pass data - // back and forth without having to reestablish sessions. This makes exchanging - // data within a WebSockets connection fast. WebSockets are often used for - // real-time applications such as live chat and gaming. For more information refer - // to - // [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). - Result ZoneSettingWebsocketListResponseResult `json:"result"` - // Whether the API call was successful - Success bool `json:"success"` - JSON zoneSettingWebsocketListResponseJSON `json:"-"` -} - -// zoneSettingWebsocketListResponseJSON contains the JSON metadata for the struct -// [ZoneSettingWebsocketListResponse] -type zoneSettingWebsocketListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebsocketListResponseError struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebsocketListResponseErrorJSON `json:"-"` -} - -// zoneSettingWebsocketListResponseErrorJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketListResponseError] -type zoneSettingWebsocketListResponseErrorJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketListResponseError) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -type ZoneSettingWebsocketListResponseMessage struct { - Code int64 `json:"code,required"` - Message string `json:"message,required"` - JSON zoneSettingWebsocketListResponseMessageJSON `json:"-"` -} - -// zoneSettingWebsocketListResponseMessageJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketListResponseMessage] -type zoneSettingWebsocketListResponseMessageJSON struct { - Code apijson.Field - Message apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketListResponseMessage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// WebSockets are open connections sustained between the client and the origin -// server. Inside a WebSockets connection, the client and the origin can pass data -// back and forth without having to reestablish sessions. This makes exchanging -// data within a WebSockets connection fast. WebSockets are often used for -// real-time applications such as live chat and gaming. For more information refer -// to -// [Can I use Cloudflare with Websockets](https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-). -type ZoneSettingWebsocketListResponseResult struct { - // ID of the zone setting. - ID ZoneSettingWebsocketListResponseResultID `json:"id"` - // Whether or not this setting can be modified for this zone (based on your - // Cloudflare plan level). - Editable ZoneSettingWebsocketListResponseResultEditable `json:"editable"` - // last time this setting was modified. - ModifiedOn time.Time `json:"modified_on,nullable" format:"date-time"` - // Value of the zone setting. - Value ZoneSettingWebsocketListResponseResultValue `json:"value"` - JSON zoneSettingWebsocketListResponseResultJSON `json:"-"` -} - -// zoneSettingWebsocketListResponseResultJSON contains the JSON metadata for the -// struct [ZoneSettingWebsocketListResponseResult] -type zoneSettingWebsocketListResponseResultJSON struct { - ID apijson.Field - Editable apijson.Field - ModifiedOn apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ZoneSettingWebsocketListResponseResult) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// ID of the zone setting. -type ZoneSettingWebsocketListResponseResultID string - -const ( - ZoneSettingWebsocketListResponseResultIDWebsockets ZoneSettingWebsocketListResponseResultID = "websockets" -) - -// Whether or not this setting can be modified for this zone (based on your -// Cloudflare plan level). -type ZoneSettingWebsocketListResponseResultEditable bool - -const ( - ZoneSettingWebsocketListResponseResultEditableTrue ZoneSettingWebsocketListResponseResultEditable = true - ZoneSettingWebsocketListResponseResultEditableFalse ZoneSettingWebsocketListResponseResultEditable = false -) - -// Value of the zone setting. -type ZoneSettingWebsocketListResponseResultValue string - -const ( - ZoneSettingWebsocketListResponseResultValueOff ZoneSettingWebsocketListResponseResultValue = "off" - ZoneSettingWebsocketListResponseResultValueOn ZoneSettingWebsocketListResponseResultValue = "on" -) - -type ZoneSettingWebsocketUpdateParams struct { - // Value of the zone setting. - Value param.Field[ZoneSettingWebsocketUpdateParamsValue] `json:"value,required"` -} - -func (r ZoneSettingWebsocketUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Value of the zone setting. -type ZoneSettingWebsocketUpdateParamsValue string - -const ( - ZoneSettingWebsocketUpdateParamsValueOff ZoneSettingWebsocketUpdateParamsValue = "off" - ZoneSettingWebsocketUpdateParamsValueOn ZoneSettingWebsocketUpdateParamsValue = "on" -) diff --git a/zonesettingwebsocket_test.go b/zonesettingwebsocket_test.go deleted file mode 100644 index 43cdcb44892..00000000000 --- a/zonesettingwebsocket_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package cloudflare_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-sdk-go" - "github.com/cloudflare/cloudflare-sdk-go/internal/testutil" - "github.com/cloudflare/cloudflare-sdk-go/option" -) - -func TestZoneSettingWebsocketUpdate(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Websockets.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - cloudflare.ZoneSettingWebsocketUpdateParams{ - Value: cloudflare.F(cloudflare.ZoneSettingWebsocketUpdateParamsValueOff), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestZoneSettingWebsocketList(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithEmail("dev@cloudflare.com"), - option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), - ) - _, err := client.Zones.Settings.Websockets.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -}